Closed Walkeezy closed 6 years ago
Hmm minDate is set only for pickadayProperties. My question would be can you access any pickaday Object properties when you use pickadayResponsive.
You can always update the pikaday instance, see: https://github.com/dbushell/Pikaday/issues/19, like this: instance.pikaday.config(...)
(Note that minDate takes a native JS date, not a moment date, so you'll need to do e.g. .confg({ minDate: myDate.toDate })
). However, this will only work if Pikaday is used, not in native mode. If someone implements https://github.com/mydea/PikadayResponsive/issues/24, we could also add a min/max property to the main config, and add corresponding methods to update them as well.
Thanks man, got it working like this:
onSelect: function() {
const arrival_value = arrivalDate.value;
const default_departure = moment(arrival_value, 'DD. MMMM YYYY').add(1,'days').toDate();
departureDate.pikaday.config({minDate: default_departure});
},
Hi!
Is there a way to set a new minDate, similar to the
setDate()
function?In my example I'm taking the value from one Pikaday-instance to set it as the selected date on another instance:
It would be nice to set the value from the first instance as minDate for the second instance.
Thanks!