disabledDateRanges


disabledDateRangesArray<DateRange>

Sets or gets ranges of dates that a site visitor can't select.

Setting the disabledDateRanges property prevents site visitors from selecting dates in the specified ranges.

Set disabledDateRanges to:

  • An array of date ranges to disable, each with a start date and an end date
  • An empty array ([]), to remove the current disabled dates

Getting the disabledDateRanges property returns the current list of disabled date ranges.

Ranges are inclusive. This means that January 10th and February 10th are disabled when specifying a range from January 10, 2025 to February 10, 2025.

Disabled dates override any dates enabled with the enabledDateRanges property. This means that if a date matches both enabled and disabled properties, the site visitor can't select the date in the date picker.

Was this helpful?
Yes
No