Update timepicker restrictions and add a minimum date
- Update timepicker options to display inline and side by side - Remove the previous restriction on minimum date - Add a new restriction for maximum date - Add a new restriction for minimum date, set to current date
This commit is contained in:
parent
f42530ea46
commit
e7fc6f707b
|
@ -38,9 +38,6 @@ function initTimepicker() {
|
||||||
datepickeroptions = Utils.timepickerOptions;
|
datepickeroptions = Utils.timepickerOptions;
|
||||||
datepickeroptions.display.inline = true;
|
datepickeroptions.display.inline = true;
|
||||||
datepickeroptions.display.sideBySide = true;
|
datepickeroptions.display.sideBySide = true;
|
||||||
datepickeroptions.restrictions = {
|
|
||||||
minDate: new Date()
|
|
||||||
};
|
|
||||||
selecttimedatepicker = new TempusDominus(document.querySelector('#selecttime_datepicker'), datepickeroptions);
|
selecttimedatepicker = new TempusDominus(document.querySelector('#selecttime_datepicker'), datepickeroptions);
|
||||||
}
|
}
|
||||||
function initRunButtons() {
|
function initRunButtons() {
|
||||||
|
@ -62,7 +59,8 @@ function initRunButtons() {
|
||||||
}
|
}
|
||||||
selecttimedatepicker.updateOptions({
|
selecttimedatepicker.updateOptions({
|
||||||
restrictions: {
|
restrictions: {
|
||||||
maxDate: maxdate
|
maxDate: maxdate,
|
||||||
|
minDate: new Date()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue