minDate
Set the minimum date that can be selected and displayed.
Please note - this property requires the DateTime extension for DataTables.
Description
This option allows a minimum selectable date to be imposed. This means that users won't be able or select dates that occur before the date set here.
Types
null
When this option is null
there is no minimum date imposed by DateTime.
string
This option can also be a string. If this is the case it must be able to be taken by the Date
constructor as an argument to create a Date instance to represent the minimum selectable date (i.e. an ISO 8601 or RFC 2822 string).
Date
This option can also be a directly given a Date
object.
Default
- Value:
null
As default, no minimum date is applied to DateTime instances.
Examples
Set minDate to the start of 2000 using a RFC 2822 string:
new DateTime(document.getElementById('test'), {
minDate: 'January 1, 2000 00:00:00'
});
Set minDate to the start of 2000 using a Date (from ISO8601 format):
new DateTime(document.getElementById('test'), {
minDate: new Date('2000-01-01 00:00:00')
});
Related
The following options are directly related and may also be useful in your application development.