Clarity uses the locale identifiers supported by Angular for getting the date format, first day of the week, month and day names. These values are used to generate the input field placeholder and the calendar.
Using the date format retrieved from Angular, the placeholder is generated in one of the following formats:
The following demo shows two date pickers. The first date picker uses the
en-US
locale identifier whereas the second one uses fr
.
Both the date pickers have different first day of the week and the calendar is generated based on the first day of the
week.
By default, Angular uses the en-US
locale but you can set your application's locale to a
different value using the --locale
parameter while building your Angular CLI
application.
Changing the locale requires its data to be registered first.
LOCALE_ID
token.
For more information on setting the locale parameter and loading the locale data, please read the Angular internationalization documentation.