# DateInput Formats

You can control the format of the DateInput by using the [`format`](https://www.telerik.com/kendo-angular-ui-develop/components/dateinputs/api/dateinputcomponent#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`](https://www.telerik.com/kendo-angular-ui-develop/components/dateinputs/api/dateinputcomponent#format) property. By default, `format` is set to `'d'`.

For more information on the supported date formats, refer to the [Formatting Options](https://www.telerik.com/kendo-angular-ui-develop/components/dateinputs/dateinput/formats#formatting-options) section.

[Demo Source](https://demos.telerik.com/kendo-angular-ui/demos/dateinputs/dateinput/formats/single-format/source.txt)

## Display and Input Formats

To use different formats for editing and display, set the [`format`](https://www.telerik.com/kendo-angular-ui-develop/components/dateinputs/api/dateinputcomponent#format) property to a [`FormatSettings`](https://www.telerik.com/kendo-angular-ui-develop/components/dateinputs/api/formatsettings) object. The `inputFormat` property defines the date parts users edit while the DateInput is focused. The `displayFormat` property controls how the date appears after the input loses focus. Both properties accept a string or a [`DateFormatOptions`](https://www.telerik.com/kendo-angular-ui-develop/components/globalization/internationalization/api/dateformatoptions) object:

```html
<kendo-dateinput [format]="dateFormat"></kendo-dateinput>
```

```ts
public dateFormat: FormatSettings = {displayFormat: 'D', inputFormat: 'd'};
```

The [`DateFormatOptions`](https://www.telerik.com/kendo-angular-ui-develop/components/globalization/internationalization/api/dateformatoptions) object supports:

* Predefined formats (defined by the [Unicode Locale Data Markup Language](https://unicode.org/reports/tr35/))—Sets the format from the [`dateFormats`](https://unicode.org/reports/tr35/tr35-dates.html#dateFormats), [`timeFormats`](https://unicode.org/reports/tr35/tr35-dates.html#timeFormats), and [`dateTimeFormats`](https://unicode.org/reports/tr35/tr35-dates.html#dateTimeFormats) elements of the calendar.
  ```ts
  public dateFormat: FormatSettings = { displayFormat: { date: 'long' }};
  ```
* Skeleton formats—Sets the format from the [`availableFormats`](https://unicode.org/reports/tr35/tr35-dates.html#availableFormats_appendItems) of the calendar based on the date fields that you want to display.
  ```ts
  // Show abbreviated month, day, year, weekday, hour, and minute.
  public 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.DateTimeFormat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) object.
  ```ts
  public dateFormat: FormatSettings = {
      displayFormat: { year: 'numeric', month: 'long' },
  };
  ```

For details on how users move between date segments as they type, see [Auto Switch Parts](https://www.telerik.com/kendo-angular-ui-develop/components/dateinputs/dateinput/typing#auto-switch-parts). The following example demonstrates how to set the `inputFormat` and `displayFormat` to a string or `DateFormatOptions` object.

[Demo Source](https://demos.telerik.com/kendo-angular-ui/demos/dateinputs/dateinput/formats/format-settings/source.txt)

## Two-Digit Year Format

Use `yy` in the DateInput [`format`](https://www.telerik.com/kendo-angular-ui-develop/components/dateinputs/api/dateinputcomponent#format) for a two-digit year. The DateInput resolves its century according to the [`twoDigitYearMax`](https://www.telerik.com/kendo-angular-ui-develop/components/dateinputs/api/dateinputcomponent#twodigityearmax) property.

If the typed year is less than or equal to `twoDigitYearMax`, the DateInput uses the current century. Otherwise, it uses the previous century.

By default, the [`twoDigitYearMax`](https://www.telerik.com/kendo-angular-ui-develop/components/dateinputs/api/dateinputcomponent#twodigityearmax) is set to `68`.

[Demo Source](https://demos.telerik.com/kendo-angular-ui/demos/dateinputs/dateinput/formats/two-digit-year/source.txt)

## Formatting Options

The [`format`](https://www.telerik.com/kendo-angular-ui-develop/components/dateinputs/api/dateinputcomponent#format) option of the DateInput supports:

* [Predefined date formats](https://www.telerik.com/kendo-angular-ui-develop/components/dateinputs/dateinput/formats#predefined-date-formats)
* [Custom date formats](https://www.telerik.com/kendo-angular-ui-develop/components/dateinputs/dateinput/formats#custom-date-formats)

### Predefined Date Formats

The predefined date formats are specifiers that convert a valid [JavaScript `Date` object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) into a human readable date or time based on the locale.

```html
<kendo-dateinput format="D"></kendo-dateinput>
```

The following table lists the supported date format specifiers for the `en` locale.

<table style="width: 100%;">
  <thead>
    <tr>
      <th style="width: 15%; white-space: nowrap;">Specifier</th>
      <th style="width: 45%;">Description</th>
      <th style="width: 40%;">Result</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code>d</code></td>
      <td>Short date pattern: <code>M/d/y</code>.</td>
      <td><code>11/6/2025</code></td>
    </tr>
    <tr>
      <td><code>D</code></td>
      <td>Long date pattern: <code>EEEE, MMMM d, y</code>.</td>
      <td><code>Thursday, November 6, 2025</code></td>
    </tr>
    <tr>
      <td><code>F</code></td>
      <td>Full date and time pattern: <code>EEEE, MMMM d, y h:mm:ss a</code>.</td>
      <td><code>Thursday, November 6, 2025 12:00:00 AM</code></td>
    </tr>
    <tr>
      <td><code>g</code></td>
      <td>General date and time pattern (short time): <code>M/d/y h:mm a</code>.</td>
      <td><code>11/6/2025 12:00 AM</code></td>
    </tr>
    <tr>
      <td><code>G</code></td>
      <td>General date and time pattern (long time): <code>M/d/y h:mm:ss a</code>.</td>
      <td><code>11/6/2025 12:00:00 AM</code></td>
    </tr>
    <tr>
      <td><code>m</code></td>
      <td>Renders an abbreviated month and day pattern: <code>MMM d</code>.</td>
      <td><code>Nov 6</code></td>
    </tr>
    <tr>
      <td><code>M</code></td>
      <td>Wide month and day pattern: <code>MMMM d</code>.</td>
      <td><code>November 6</code></td>
    </tr>
    <tr>
      <td><code>y</code></td>
      <td>Renders an abbreviated month/year pattern: <code>MMM y</code>.</td>
      <td><code>Nov 2025</code></td>
    </tr>
    <tr>
      <td><code>Y</code></td>
      <td>Wide month and year pattern: <code>MMMM y</code>.</td>
      <td><code>November 2025</code></td>
    </tr>
    <tr>
      <td><code>t</code></td>
      <td>Short time pattern: <code>h:mm a</code>.</td>
      <td><code>2:30 PM</code></td>
    </tr>
    <tr>
      <td><code>T</code></td>
      <td>Long time pattern: <code>h:mm:ss a</code>.</td>
      <td><code>2:30:45 PM</code></td>
    </tr>
    <tr>
      <td><code>s</code></td>
      <td>Renders a universal sortable local date and time pattern: <code>yyyy-MM-dd'T'HH:mm:ss</code>.</td>
      <td><code>2025-11-06T00:00:00</code></td>
    </tr>
    <tr>
      <td><code>u</code></td>
      <td>Renders a universal sortable UTC date and time pattern: <code>yyyy-MM-dd HH:mm:ssZ</code>.</td>
      <td><code>2025-11-06 00:00:00Z</code></td>
    </tr>
  </tbody>
</table>

### 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.

```html
<kendo-dateinput format="dd MMM"></kendo-dateinput>
<kendo-dateinput format="QQQ y"></kendo-dateinput>
<kendo-dateinput format="HH:mm:ss"></kendo-dateinput>
```

The following table lists the supported format specifiers that can be used in custom date formats:

<table style="width: 100%;">
<thead>
<tr>
<th style="width: 15%; white-space: nowrap;">Specifier</th>
<th style="width: 35%;">Description</th>
<th style="width: 50%;">Result</th>
</tr>
</thead>
<tbody>
    <tr>
      <td><code>y</code></td>
      <td>Renders the year.</td>
      <td><ul><li><code>y</code>&mdash;Full year and month (<strong>Sep 2025</strong>).</li> <li><code>yy</code>&mdash;Two digit year (<strong>96</strong>).</li> <li><code>yyy</code>, <code>yyyy</code>&mdash;Full year (<strong>2025</strong>).</li></ul></td>
    </tr>
    <tr>
      <td><code>M</code></td>
      <td>Renders the month.</td>
      <td><ul><li><code>M</code>&mdash;Numerical month (<strong>1</strong>).</li> <li><code>MM</code>&mdash;Zero-padded numerical month (<strong>01</strong>).</li> <li><code>MMM</code>&mdash;Abbreviated month (<strong>Jan</strong>).</li> <li><code>MMMM</code>&mdash;Wide month name (<strong>January</strong>).</li> <li><code>MMMMM</code>&mdash;Narrow month name (<strong>J</strong>).</li></ul></td>
    </tr>
    <tr>
      <td><code>L</code></td>
      <td>The same as the <code>M</code> specifier except that the <code>L</code> specifier uses the standalone names.</td>
      <td><ul><li>See <code>M</code>.</li></ul></td>
    </tr>
    <tr>
      <td><code>d</code></td>
      <td>Renders the day of the month.</td>
      <td><ul><li><code>y d</code>&mdash;Day of month (<strong>2025 8</strong>).</li><li><code>y dd</code>&mdash;Zero-padded day of month (<strong>2025 08</strong>).</li></ul></td>
    </tr>
    <tr>
      <td><code>E</code></td>
      <td>Renders the day of the week.</td>
      <td><ul><li><code>E</code>, <code>EE</code>, <code>EEE</code>&mdash;Abbreviated day name (<strong>Wed</strong>).</li> <li><code>EEEE</code>&mdash;Wide day name (<strong>Wednesday</strong>).</li> <li><code>EEEEE</code>&mdash;Narrow day name (<strong>W</strong>).</li><li><code>EEEEEE</code>&mdash;Short day name (<strong>We</strong>).</li></ul></td>
    </tr>
    <tr>
      <td><code>a</code></td>
      <td>Renders the day period.</td>
      <td><ul><li><code>a</code>, <code>aa</code>, <code>aaa</code>&mdash;Short day period name(<strong>AM</strong>).</li> <li><code>aaaa</code>&mdash;Wide day period name (<strong>AM</strong>).</li> <li><code>aaaaa</code>&mdash;Narrow day period name (<strong>a</strong>).</li></ul></td>
    </tr>
    <tr>
      <td><code>h</code></td>
      <td>Renders the hour using a 12-hour clock from 1 to 12.</td>
      <td><ul><li><code>h a</code>&mdash;Show hour (<strong>1 PM</strong>).</li> <li><code>hh a</code>&mdash;Zero-padded hour (<strong>01 PM</strong>).</li></ul></td>
    </tr>
    <tr>
      <td><code>H</code></td>
      <td>Renders the hour using a 24-hour clock from 0 to 23.</td>
      <td><ul><li><code>H:mm</code>&mdash;Show hour (<strong>1:00</strong>).</li> <li><code>HH:mm</code>&mdash;Two digits hour (<strong>13:00</strong>).</li></ul></td>
    </tr>
    <tr>
      <td><code>m</code></td>
      <td>Renders the minutes from 0 to 59.</td>
      <td><ul><li><code>H:m</code>&mdash;Show minutes (<strong>1:1</strong>).</li> <li><code>H:mm</code>&mdash;Two digits minutes (<strong>1:01</strong>).</li></ul></td>
    </tr>
    <tr>
      <td><code>s</code></td>
      <td>Renders the seconds from 0 to 59.</td>
      <td><ul><li><code>HH:mm:s</code>&mdash;Show seconds (<strong>01:01:1</strong>).</li> <li><code>HH:mm:ss</code>&mdash;Two digits seconds (<strong>01:01:01</strong>).</li></ul></td>
    </tr>
    <tr>
      <td><code>S</code></td>
      <td>Renders the fractional seconds. It truncates based on the number of letters.</td>
      <td><ul><li><code>s.S</code>&mdash;Show fractional seconds (<strong>1.1</strong>).</li> <li><code>s.SS</code>&mdash;Two digits fractional seconds (<strong>1.12</strong>).</li> <li><code>s.SSS</code>&mdash;Three digits fractional seconds (<strong>1.123</strong>).</li></ul></td>
    </tr>
</tbody>
</table>

#### Read-Only Format Specifiers

The following format specifiers are supported for display purposes only. The DateInput does not allow users to edit values formatted with these specifiers:

<table style="width: 100%;">
<thead>
<tr>
<th style="width: 15%; white-space: nowrap;">Specifier</th>
<th style="width: 35%;">Description</th>
<th style="width: 50%;">Result</th>
</tr>
</thead>
<tbody>
    <tr>
      <td><code>k</code></td>
      <td>Renders the hour using a 24-hour clock from 1 to 24.</td>
      <td><ul><li><code>k:mm</code>&mdash;Show hour (<strong>1:00</strong> or <strong>24:00</strong>).</li> <li><code>kk:mm</code>&mdash;Two digits hour (<strong>01:00</strong> or <strong>24:00</strong>).</li></ul></td>
    </tr>
    <tr>
      <td><code>K</code></td>
      <td>Renders the hour using a 12-hour clock from 0 to 11.</td>
      <td><ul><li><code>K a</code>&mdash;Show hour (<strong>0 AM</strong>).</li> <li><code>KK a</code>&mdash;Two digits hour (<strong>00 AM</strong>).</li></ul></td>
    </tr>
    <tr>
      <td><code>e</code></td>
      <td>The same as the <code>E</code> specifier except that it adds a numeric value that depends on the local starting day of the week.</td>
      <td><ul><li><code>e</code>&mdash;Numeric day of the week (<strong>3</strong>).</li> <li><code>ee</code>&mdash;Zero-padded numeric day of the week (<strong>03</strong>).</li></ul></td>
    </tr>
    <tr>
      <td><code>c</code></td>
      <td>The same as the <code>e</code> specifier except that it uses the standalone names.</td>
      <td><ul><li>See <code>e</code>.</li></ul></td>
    </tr>
    <tr>
      <td><code>z</code></td>
      <td>Renders the timezone.</td>
      <td><ul><li><code>z</code>, <code>zz</code>, <code>zzz</code>&mdash;Short localized GMT format (<strong>GMT+2</strong>).</li> <li><code>zzzz</code>&mdash;Long localized GMT format (<strong>GMT+02:00</strong>).</li></ul></td>
    </tr>
    <tr>
      <td><code>Z</code></td>
      <td>Renders the timezone.</td>
      <td><ul><li><code>Z</code>, <code>ZZ</code>, <code>ZZZ</code>&mdash;Show the <code>ISO8601</code> format with hours and minutes (<strong>+0200</strong>).</li> <li><code>ZZZZ</code>&mdash;Long localized GMT format (<strong>GMT+02:00</strong>).</li> <li><code>ZZZZZ</code>&mdash;Extended <code>ISO8601</code> format (<strong>+02:00</strong>).</li></ul></td>
    </tr>
    <tr>
      <td><code>x</code></td>
      <td>The same as the <code>X</code> specifier except that the <code>x</code> specifier does not add the UTC indicator when the offset is <code>0</code> (zero).</td>
      <td><ul><li>See <code>X</code>.</li></ul></td>
    </tr>
    <tr>
      <td><code>X</code></td>
      <td>Renders the timezone.</td>
      <td><ul><li><code>X</code>&mdash;Show the <code>ISO8601</code> format with hours and optional minutes (<strong>+02</strong>).</li> <li><code>XX</code>, <code>XXXX</code>&mdash;Show the <code>ISO8601</code> format with hours and minutes (<strong>+0200</strong>).</li> <li><code>XXX</code>, <code>XXXXX</code>&mdash;Extended <code>ISO8601</code> format (<strong>+02:00</strong>).</li></ul></td>
    </tr>
    <tr>
      <td><code>q</code></td>
      <td>The same as the <code>Q</code> specifier except that the <code>q</code> specifier uses the standalone names.</td>
      <td><ul><li>See <code>Q</code>.</li></ul></td>
    </tr>
    <tr>
      <td><code>Q</code></td>
      <td>Renders a quarter of the year.</td>
      <td><ul><li><code>Q</code>, <code>QQ</code>&mdash;Numerical quarter (<strong>3</strong>).</li> <li><code>QQQ</code>&mdash;Abbreviated quarter (<strong>Q3</strong>).</li> <li><code>QQQQ</code>&mdash;Wide quarter name (<strong>3rd quarter</strong>).</li> <li><code>QQQQQ</code>&mdash;Narrow quarter name (<strong>3</strong>).</li></ul></td>
    </tr>
    <tr>
      <td><code>G</code></td>
      <td>Renders the era name when used in a custom format.</td>
      <td><ul><li><code>G</code>, <code>GG</code>, <code>GGG</code>&mdash;Abbreviated era (<strong>AD</strong>).</li> <li><code>GGGG</code>&mdash;Wide era name (<strong>Anno Domini</strong>).</li> <li><code>GGGGG</code>&mdash;Narrow era name (<strong>A</strong>).</li></ul></td>
    </tr>
</tbody>
</table>

## Suggested Links

* [API Reference of the DateInput](https://www.telerik.com/kendo-angular-ui-develop/components/dateinputs/api/dateinputcomponent)
* [Supported Date and Number Formats](https://github.com/telerik/kendo-intl/tree/master/docs)
