max()
Set the max date for the DateTime instance.
Please note - this property requires the DateTime extension for DataTables.
Description
This method sets the max date for the DateTime instance. It takes either a Date instance directly or a string representing a date that is then parsed into a date.
Types
max(date)
Set the max date for the DateTime instance.
Parameters:
Name | Type | Optional | |
---|---|---|---|
1 | date | No | |
Date as a string that is to be the max date for this instance of DateTime. |
Returns:
DateTime
Self for chaining.
max(date)
Set the max date for the DateTime instance.
Parameters:
Name | Type | Optional | |
---|---|---|---|
1 | date | No | |
Date that is to be the max date for this instance of DateTime. |
Returns:
DateTime
Self for chaining.
Example
Set the max date for DateTime:
var dt = new DateTime(document.getElementById('example'));
dt.max('2025-12-31');