I have a column bound to a nullable datetime on my entity framework object. I have my formatting set to yyyy-MM-dd. The grid renders properly.
But when I click to edit, all I get is a textbox, and the textbox has changed the formatting of the date from
2013-03-20
to
Wed Mar 20 00:00:00 EDT 2013.
And worse, without even actually editting that date, I can't save anymore as I get a date format validation error.
I've tried various things getting ideas from other posts. Right now what I have:
But when I click to edit, all I get is a textbox, and the textbox has changed the formatting of the date from
2013-03-20
to
Wed Mar 20 00:00:00 EDT 2013.
And worse, without even actually editting that date, I can't save anymore as I get a date format validation error.
I've tried various things getting ideas from other posts. Right now what I have:
columns.Bound(p => p.SaleDate).Format("{0:yyyy-MM-dd}").EditorTemplateName("saleDatePicker");
then I also have
<
script
type
=
"text/x-kendo-template"
id
=
"saleDatePicker"
>
@(Html.Kendo().DatePicker().Name("SaleDatePicker"))
</
script
>
For a datepicker, should I even be doing anything or should it be automatic?