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

Grid Editing Custom MVC - DateTime column doesn't turn into "Kendo DatePicker"

1 Answer 1056 Views
Grid
This is a migrated thread and some comments may be shown as answers.
alperen
Top achievements
Rank 1
alperen asked on 16 Dec 2019, 03:44 PM

Hi everyone,
I used "Grid - Editing Custom", when I click DateTime column "(columns.Bound( p => p.myDate)" , my code not covered by;

<span class="k-widget k-datepicker" style>
    <span class="k-picker-wrap k-state-default">
       <input class="text-box single-line" data-val="true" type="date" value="1.01.0001" ..... />

Here this is my case;
    my result only  <input class="text-box single-line" data-val="true" type="date" value="1.01.0001" ..... />   
    not covered picker spans.

When I used also "dropdown" in grid column, when I click my column, my code not covered by;

<span class="k-widget k-dropdown">

 

I checked my all css and javascript files.

 

Please help me.
Thank you.


1 Answer, 1 is accepted

Sort by
0
Alex Hajigeorgieva
Telerik team
answered on 18 Dec 2019, 09:35 AM

Hi, Alperen,

Thank you for trying out the Kendo UI suite. 

This ticket was submitted three times in the Kendo UI jQuery forums and I have deleted the others as they were duplicated. From the provided code snippet, it looks as if the question is intended for the UI for ASP.NET MVC wrappers.

If this is the case, the DateTime types should automatically invoke the Kendo UI DateTimePicker if the Editor is available.

Telerik projects and MVC distribution feature the editors in ~wrappers\aspnetmvc\EditorTemplates. For the MVC to load the editors, they should be placed in the ~Views\Shared\EditorTemplates folder. Here is the code that you should see for the DateTime field:

@model DateTime?

@(Html.Kendo().DateTimePickerFor(m => m))

This is what a Telerik project would have and here you should also place the DropDownList custom editor:

Here is the article on Custom Editors from the documentation regarding the second question:

https://docs.telerik.com/aspnet-mvc/helpers/data-management/grid/templating/editor-templates

In case you already have the Editors in the folder, can you share the Model myDate property?

Kind Regards,
Alex Hajigeorgieva
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Grid
Asked by
alperen
Top achievements
Rank 1
Answers by
Alex Hajigeorgieva
Telerik team
Share this question
or