{hero}

display()

Since: DateTime 1.5.0

Get / set the month and year for the current display.
Please note - this property requires the DateTime extension for DataTables.

Description

This method is used to programmatically control the calendar month that is shown to the end user. That can be useful for jumping around long time periods, or encouraging users to enter data in a specific month.

It might typically be used with a change or focus event listener. The get value should only be relied upon when the calendar display is shown (field has focus), and the setter will only have an affect under the same condition.

Types

function display()

Description:

Get the month and year of the calendar that is currently shown to the end user.

Returns:

Object containing month and year properties. Note that month starts at 1 for January.

function display(year, month)

Description:

Set the month / year calender to be shown to the end user.

Parameters:
Returns:

Self for chaining.