Open robfaas opened 8 years ago
Hi robfaas,
Probably at this time your doubt is solved... or not used today, but if someone else is looking for something similar to your original needs (that are exactly the same than mine), you can achieve the same results this way:
dateValidator: function (d) {
var HOLIDAY_LIST = ['25/12/2018', '01/01/2019'];
var isHoliday = HOLIDAY_LIST.indexOf(moment(d).format('DD/MM/YYYY'))>=0;
return (!isHoliday && moment(d).day() !== 0);
}
Where the isHoliday
flag has the same effect than the except function provided internally, and we format the d
parameter to match the holidays strings format.
Hope it helps!
Hi qmarcos,
Thanks, it is indeed solved now. By using another script :) I'm using https://github.com/flatpickr/flatpickr now.
Is it possible to make some specific dates invalid AND certain weekdays? The script below is not working. Any suggestions?
dateValidator: rome.val.except(['2016-05-06', '2016-05-13']), dateValidator: function (d) { return (moment(d).day() !== 3); },