Pikaday in Handsontable

Tags: #<Tag:0x00007fc45ebe1ea8>

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.

@jsiegel could you please look into it? Thanks.

@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.

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');
  }
}

closed with related issue: https://github.com/handsontable/handsontable/issues/3225