I want to only allow users to select Fridays. Basically they are choosing the start date for a schedule, and the schedules always must start on a Friday.
I am not really concerned with whether the other days are displayed or not as long as if they are displayed, then they are disabled.
You can use the
beforeShowDateoption, like this:You can try a demo here, we’re just checking if the
.getDay()on the date it’s trying to show is5(Friday), and if sotrueis the first element in the array,falseotherwise, which disables the date in the picker.