This is a migrated thread and some comments may be shown as answers.

DatePicker template on a Grid with InLine editing

1 Answer 620 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Brian
Top achievements
Rank 1
Brian asked on 17 Oct 2013, 07:32 PM
I am trying to use a DatePicker for a column, during InLine editing on a grid.
columns.Bound(x => x.Date).EditorTemplateName("Date").Format("{0:MM/dd/yy}");
 In Edit mode, the datepicker does not retain the right value.  It gets set to "mm/dd/yyyy".  There is also no styling put on it. (see the attached screenshot)

My EditorTemplates are in the right place, "~Views/Shared/EditorTemplates".  DatePicker's in other places act and look normal.  The DataType for that field is set to a Date data type in the model definition.

What am I missing here?  Why does the datepicker value get set to 'mm/dd/yyyy' and why is there no styling?

1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 21 Oct 2013, 10:42 AM
Hello Brian,

If an editor template named "Date" is already added to the EditorTemplates folder then the problem can be caused by having another element on the page with ID "Date" that will be initialized instead of the input in the editor. If that is the case then you should change the element ID(If it is another widget then you can use the HtmlAttributes method to change only the ID) in order to avoid the problem. If there isn't another element then please provide a runnable sample so I can investigate further.

Regards,
Daniel
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Brian
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or