The purpose of formatting is to convert a Date object to display the date in a specific string format is to simplify the date representation. Each culture has a standard format to display the date value. For example, in English culture, the month is displayed first followed by date and year, and in some other cultures, the date is displayed first followed by month and year. Hence, this may become uncertain to differentiate between the month and date in the displayed value. To overcome this, a custom format can be specified to display the date format as explained as follows.
By default, in the DatePicker component, the date format is culture specific which is convenient for the users in the specific culture. Customize the format to display the date in any required format can be defined by using the property of the DatePicker component.
Refer to the following code example to set the format value of the DatePicker component.
The previous code displays the date as follows.
Refer to the following sample link to check the functionality of format API of the DatePicker component.
|Article ID:||Published Date:||Last Revised Date:||Platform:||Control:|