Example: I only want to allow people to select a date that is at least 5 business days away from the current date.
I found the code for disabling weekends on the flatpickr site but I don't where to up the code. A similar question has been asked before, but I still cannot figure out where to put it!
My current code:
Qualtrics.SurveyEngine.addOnload(function()
{
jQuery("#"+this.questionId+" input[type=text]").flatpickr({
dateFormat: "m/d/Y",
minDate:new Date().fp_incr(5)});
});
Disabling weekend code found on flatpickr
{
"disable": [
function(date) {
// return true to disable
return (date.getDay() === 0 || date.getDay() === 6);
}
],
"locale": {
"firstDayOfWeek": 1 // start week on Monday
}
}
Best answer by dobra021
View original