Formats
You can control the format of the DatePicker by using the format property.
The component can be configured either to display a single format at all times, or to display the value in different formats when the input is focused or blurred.
Single Format
To always display a single format, provide a string value to the format property. By default, format is set to 'd'.
For more information on the supported date formats, refer to the Formatting Options section.
Display and Input Formats
To display different formats when an input is focused and when blurred, set the format property to a FormatSettings object. Set the inputFormat to format the date when the input is focused and displayFormat when the input is blurred. Both properties can be set to a string or DateFormatOptions object:
<kendo-datepicker [format]="dateFormat"></kendo-datepicker>
public dateFormat: FormatSettings = {displayFormat: 'D', inputFormat: 'd'};
The DateFormatOptions object supports:
- Predefined formats (defined by the Unicode Locale Data Markup Language)—Sets the format from the
dateFormats,timeFormats, anddateTimeFormatselements of the calendar.tspublic dateFormat: FormatSettings = { displayFormat: { date: 'long' }}; - Skeleton formats—Sets the format from the
availableFormatsof the calendar based on the date fields that you want to display.tspublic dateFormat: FormatSettings = { displayFormat: { skeleton: 'yMMMdEHm' }} - Fields formats—Similar to the skeleton formats except that you need to set the required fields by using separate options in the same way as the
Intl.DateTimeFormatobject.tspublic dateFormat: FormatSettings = { displayFormat: { year: 'numeric', month: 'long' }, };
The following example demonstrates how to set the inputFormat and displayFormat to a string or DateFormatOptions object.
Two-Digit Year Format
When the DatePicker format includes a two-digit year, the value will automatically be normalized to the current or previous century.
Whether the value will be assumed to be from the current or previous century is controlled by the twoDigitYearMax property. If the typed value is less than or equal to the twoDigitYearMax value, the date will be assumed to be from the current century. If it's more than it, the date will be assumed to be from the previous century.
By default, the twoDigitYearMax is set to 68.
Values selected from the popup Calendar are not normalized. To prevent the user from selecting an out-of-range value from it, provide the DatePicker with the desired
minandmaxvalues.
Formatting Options
The format option of the DatePicker supports:
Predefined Date Formats
The predefined date formats are specifiers that convert a valid JavaScript Date object into a human readable date or time based on the locale.
<kendo-datepicker format="D"></kendo-datepicker>
The following table lists the supported date format specifiers for the en locale.
| Specifier | Description | Result |
|---|---|---|
d | Short date pattern: M/d/y. | 10/6/2025 |
D | Long date pattern: EEEE, MMMM d, y. | Monday, November 6, 2025 |
F | Full date and time pattern: EEEE, MMMM d, y h:mm:ss a. | Monday, November 6, 2025 12:00:00 AM |
g | General date and time pattern (short time): M/d/y h:mm a. | 11/6/2025 12:00 AM |
G | General date and time pattern (long time): M/d/y h:mm:ss a. | 11/6/2025 12:00:00 AM |
m | Renders an abbreviated month and day pattern: MMM d. | Nov 6 |
M | Wide month and day pattern: MMMM d. | November 6 |
y | Renders an abbreviated month/year pattern: MMM y. | Nov 2025 |
Y | Wide month and year pattern: MMMM y. | November 2025 |
t | Short time pattern: h:mm a. | 2:30 PM |
T | Long time pattern: h:mm:ss a. | 2:30:45 PM |
s | Renders a universal sortable local date and time pattern: yyyy-MM-dd HH:mm:ss. | 2025-11-06T00:00:00 |
u | Renders a universal sortable UTC date and time pattern: yyyy-MM-dd HH:mm:ssZ. | 2025-11-06 00:00:00Z |
Custom Date Formats
When the predefined date format options do not fit the requirements, you can create a custom date format string by using one or more custom date specifiers. This approach is useful when you want to format dates in a specific format.
<kendo-datepicker format="dd MMM"></kendo-datepicker>
<kendo-datepicker format="QQQ y"></kendo-datepicker>
<kendo-datepicker format="HH:mm:ss"></kendo-datepicker>
The following table lists the supported format specifiers that can be used in custom date formats:
| Specifier | Description | Result |
|---|---|---|
y | Renders the year. |
|
M | Renders the month. |
|