Apply a Custom Date Format to a Dropdown
In this article, I’ll demonstrate how to apply a custom format to a date within a dropdown.
I’ll begin with a View Model containing my date property.
Next, I call my controller action for DataSource.Read() – see my other Telerik articles (link) for an example.
The important update lies in the View where I specify my dropdown’s template.
First, I call kendo.parseDate() to format the date according to my custom format.
Then, I pass that result for each row to kendo.toString(), along with a the same format so that it’s displayed correctly.
Note: Both kendo function calls are necessary.
As you can see, my date is formatted as expected within the dropdown.