jihoon
(Jihoon)
February 10, 2016, 5:15pm
1
The pikaday date functionality works awesome for the most part - however, I’m running into issues with their maxDate() functionality. It’s the only functionality that doesn’t seem to work.
It seems easy enough to use, according to the documentation…
maxDate: moment().toDate(),
Hi @jihoon I’ll check it and get back to you as soon as possible.
chris
(Krzysztof Spilka)
February 12, 2016, 8:26am
3
@jsiegel could you please look into it? Thanks.
jsiegel
(Jan Siegel)
February 12, 2016, 10:37am
4
@jihoon You’re right, maxDate and minDate aren’t properly passed to Pikaday.
I’ve created and issue on our Github issue tracker, you can see the progress on this there: https://github.com/handsontable/handsontable/issues/3225 .
jihoon
(Jihoon)
February 12, 2016, 7:55pm
5
Thanks. I’ve also found a workaround that lets me disable future dates, using moment.js.
datePickerConfig: {
firstDay: 0,
disableDayFn: function(date) {
// Disable Sunday, Saturday, and any future dates
return date.getDay() === 0 || date.getDay() === 6 || moment().isBefore(moment(date), 'day');
}
}