Datepicker restricted days

Hi!

Is there a way to restrict the selectable days in a date picker? I would like to restrict e.g. to tomorrow and following, not today or the days in the past. And maybe also not on a certain weekday, e.g. Mondays.

Thanks for your help!

Frank

You can set min and max attribute range on the field. But I think for a dynamic date such as tomorrow and excluding days, you will need to use JavaScript.

Thanks Malachiman! How can I achieve this? which of the Script need modification? Would be a “min: 1” mean from today +1?

Cheers,
Frank

The JavaScript would need to be made, and it is complex, it’s not something I would provide in the forum. And no the min max attributes don’t work like that, as I said dynamic dates would need to be coded.

What do you want to build? A booking system? For that it would be easier to integrate an external script, e.g. from https://www.phpjabbers.com.

1 Like