I have an issue to disply the datepicker in kendo inline editing. It shows datetime picker all the times.
columns.Bound(k => k.datefrom).ClientTemplate("#= (datefrom == null) ? ' ' : kendo.toString(datefrom, 'dd.MM.yyyy') #").Width(150);
I also tried like this also
columns.Bound(k => k.datefrom).ClientTemplate("#= (datefrom == null) ? ' ' : kendo.toString(datefrom, 'dd.MM.yyyy') #").Format("{0:d}").Width(150);
Any idea?
You need to specify the Model Property strictly to Date in View model using Data Annotations. In your view model,
[DataType(DataType.Date)] // making data type as date
public Nullable<System.DateTime> datefrom { get; set; }
And in Kendo Grid,
columns.Bound(k => k.datefrom).Format("{0:dd.MM.yyyy}")
It works now :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With