I know that DatePicker has a format attribute (http://docs.kendoui.com/api/web/datepicker#configuration-format).
But what if I had a grid with a date column. Can I set the format of the DatePicker that is used here in edit mode?
By the way, I am using fluid syntax.
3 Answers, 1 is accepted
0
Kiril Nikolov
Telerik team
answered on 18 Jun 2013, 10:34 AM
Hello Patrick,
In order to format the date column in your grid, you can set the columns.format property. The format will be passed to the default DatePicker editor. For example:
columns: [{
field: "date",
format: "{0: yyyy-MM-dd}"
}]
Regards, Kiril the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
This does not work. If I set the format on the column, the grid column displays the date in te right format. But if I edit this cell, the datePicker shows up with no format.
I want to use only the year part of my date, so I format the column like this:
columns: [{
title: "Date",
field: "date",
format: "{0:yyyy}"
}]
So only the year is shown on the grid, but the datePicker displays the days and months.
Any ideas?
0
Kiril Nikolov
Telerik team
answered on 07 Mar 2016, 08:15 AM
Hello Larissa,
For editing - you can define a custom editor where you can set the format. If you have problems with that - please open a support request and we will be happy to help.
Regards,
Kiril Nikolov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!