Overview

There are many, many ways to limit date selection in DateBox. Rather than spend a lot of time explaining each of them, I’ve choosen to show groupings of similar options below, along with the links to the appropriate API documentation. Please refer to the API documentation for which modes are valid for each option they are not nessisarily universal.

By far the simplest method of limiting dates is to use the min/max attributes of the element. These should be set to an ISO style date string i.e. 2000-01-01

Today booleans

These are exclusive switches - so afterToday means “selected date must be after today’s date (or on it)”, beforeToday means “selected date must be before today’s date (or on it)”, notToday means “slected date can not be today’s date”

Numeric Date Limits

Numeric Time Limits

Note: valid hours is an array. i.e. [1,2,3,4]

[9,10,11,12,13,14,15,16] / false

Date List Limits

Note: Please view the API documentation for each option to understand the required data format.

[0,6] / false
["2001-01-01", "2000-12-31"] / false
[[-1,11,25],[-1,0,1]] / false
["2001-01-01", "2000-12-31"] / false
["2001-01-01", "2001-12-25"] / false