Skip to main content

dateFormat

defines the format of dates in Calendar

dateFormat?: string;
Default value: "%d/%m/%y"

Example

var calendar = new dhx.Calendar("calendar_container", {   dateFormat:"%d.%m.%Y"});

Related sample: Calendar. Date Format

dhtmlxCalendar uses the following characters for setting a date format:

CharacterDefinition
%dday as a number with leading zero, 01..31
%jday as a number, 1..31
%Dshort name of the day, Su Mo Tu...
%lfull name of the day, Sunday Monday Tuesday...
%mmonth as a number with leading zero, 01..12
%nmonth as a number, 1..12
%Mshort name of the month, Jan Feb Mar...
%Ffull name of the month, January February March...
%yyear as a number, 2 digits
%Yyear as a number, 4 digits
%hhours 12-format with leading zero, 01..12)
%ghours 12-format, 1..12)
%Hhours 24-format with leading zero, 00..23
%Ghours 24-format, 0..23
%iminutes with leading zero, 01..59
%sseconds with leading zero, 01..59
%aam or pm
%AAM or PM
%umilliseconds