Search.../

minDate

Sets or gets the earliest date that a site visitor can select.

Description

Setting the minDate property prevents site visitors from selecting dates before the minimum date.

Set minDate to undefined to remove the current minimum date limitation.

Getting the minDate property returns the current minimum date that a site visitor can select.

If a date is before the minimum date but is also set as an enabled date with the enabledDateRanges property, the date is disabled and the site visitor can't select the date in the date picker.

Type:

DateRead & Write, default value is undefined

Related Content:

Was this helpful?

Get a date picker's minimum date

Copy Code
1// minDate must be set before it can be retrieved. For example,
2// $w("#myDatePicker").minDate = new Date('01/13/2017');
3
4let pickerMinDate = $w("#myDatePicker").minDate;
5
6let minStr = pickerMinDate.toDateString(); // "Fri Jan 13 2017"
Set a date picker's minimum date to today

Copy Code
1$w("#myDatePicker").minDate = new Date('01/13/2017');