{hero}

firstDay

Since: DateTime 1.0.0

Change which day of the week is first on the calendar.
Please note - this property requires the DateTime extension for DataTables.

Description

This option allows for the "first" day to be changed to any of the days of the week as desired.

Type

number

Description:

This value represents which day of the week should be in the first column of datetime.

Default

  • Value: 1

The default value of 0 represents Sunday - the days are 0 indexed starting from Sunday:

  • 0 - Sunday
  • 1 - Monday
  • 2 - Tuesday
  • 3 - Wednesday
  • 4 - Thursday
  • 5 - Friday
  • 6 - Saturday

Example

Change first day to Saturday:

new DateTime(document.getElementById('test'), {
	firstDay: 6
});