Changed the default date and min date for the Tempus Dominus month chooser from strings to the JavaScript Date objects.
This commit is contained in:
parent
4977847dd8
commit
122b7b059c
@ -175,7 +175,7 @@ class MonthTab extends TabPlane {
|
||||
let start = monthChooser.dataset.start;
|
||||
this.#monthChooser = new tempusDominus.TempusDominus(monthChooser, {
|
||||
restrictions: {
|
||||
minDate: start,
|
||||
minDate: new Date(start),
|
||||
},
|
||||
display: {
|
||||
inline: true,
|
||||
@ -184,7 +184,7 @@ class MonthTab extends TabPlane {
|
||||
clock: false,
|
||||
},
|
||||
},
|
||||
defaultDate: monthChooser.dataset.default,
|
||||
defaultDate: new Date(monthChooser.dataset.default),
|
||||
});
|
||||
monthChooser.addEventListener(tempusDominus.Namespace.events.change, (e) => {
|
||||
const date = e.detail.date;
|
||||
|
Loading…
Reference in New Issue
Block a user