Search...
maxDate
Sets or gets the latest date that a site visitor can select.
Description
Setting the maxDate
property prevents site visitors from selecting
dates past the maximum date.
Set maxDate
to undefined
to remove the
current maximum date limitation.
Getting the maxDate
property returns the current maximum
date that a site visitor can select.
If a date is past the maximum 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 maximum date
Copy Code
1// maxDate must be set before it can be retrieved. For example,2// $w("#myDatePicker").maxDate = new Date('01/13/2017');34let pickerMaxDate = $w("#myDatePicker").maxDate;56let maxStr = pickerMaxDate.toDateString(); // "Fri Jan 13 2017"
Set a date picker's maximum date to today
Copy Code
1$w("#myDatePicker").maxDate = new Date('01/13/2017');