Telerik Forums
UI for ASP.NET Core Forum
1 answer
41 views

I have created a fresh project with the following variables:

  • Visual Studio 22 Community (Version 17.14.21 )
  • Progress Telerik UI for ASP.NET Core Extension 2025.4.1110.199
  • .NET 9.0
  • Kendo UI v2025.4.1111

I am trying to create a simple grid as following that has an editable `DateTime?` column:

https://netcorerepl.telerik.com/GpFmvpEr29UDYPJN54

It works in the REPL link above, but if I press "Edit" on my local project, the DateTime column defaults to a text input without the datetimepicker buttons (see Attachment-1.png), I'm not sure what I am missing.

 

I've checked that `/Views/Shared/Editor/Templates/DateTime.cshtml` exists and the content is as follows:

@model DateTime?

@(Html.Kendo().DateTimePickerFor(m => m).HtmlAttributes(new { title = Html.ViewContext.ViewData.TemplateInfo.GetFullHtmlFieldName("")}))

I've placed either `[DataType("Date")]` or `[DataType("DateTime")]` annotation on the class property definition and neither worked.

I've used `.EditorTemplateName("DateTime")` and/or `[UIHint("DateTime")]` and it didn't work.

I've created a new Template type and it didn't work.

I'm not sure what else to try to make it work.

Viktor Tachev
Telerik team
 answered on 17 Dec 2025
1 answer
223 views

In the latest release, 23.1.4, a Date time picker with the DateInput option set fails to be initialized with a jQuery error "s is not a constructor".

This occurs in my code and when using the example from the demo pages https://demos.telerik.com/aspnet-core/datepicker/basic-usage

TagHelper:

<kendo-datepicker name="monthpicker" date-input="true" format="MMMM yyyy" value="DateTime.Now" start="CalendarView.Year" depth="CalendarView.Year" name="monthpicker" style="width: 100%" title="monthpicker">
        </kendo-datepicker>

HtmlHelper:

@(Html.Kendo().DatePicker() .Name("monthpicker") .Start(CalendarView.Year) .Depth(CalendarView.Year) .Format("MMMM yyyy") .Value("November 2011") .DateInput() .HtmlAttributes(new { style = "width: 100%", title = "monthpicker" }) )

 

Both of the above fail to be initialized with the same error. JQuery version 3.3.1 is being used in this case.

Gordon

Mihaela
Telerik team
 answered on 31 Jul 2023
1 answer
412 views

Afternoon.

I have a MVC Grid with popup editing, created using an example posted on a previous question from me:

https://www.telerik.com/forums/grid-popup-editing-1551548

The popup edit only updates some of the fields in the grid.

I have a datetime field Dateinpost which is set when the record is created - it doesn't need to be updated.

I have set its format in the model:

        [DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:dd/MM/yyyy}")]
        [DataType(DataType.DateTime)]
        public DateTime? Dateinpost { get; set; }

It doesn't need to appear on the popup template, but I have included it here so that you can see its value:

    <div class="k-edit-field">
        @Html.EditorFor(model => model.Dateinpost)
    </div>

When I update any of the values I get the following ModelState error in the Update action, and the value of Dateinpost in the model is null;

As you can see, the format of the date in AttemptedValue is not correct.

I could write a work around that would clear the ModelState error and not update that field, as it's not to be updated anyway, but it seems that shouldn't be necessary.  I've also tried using a date format of "dd/MM/yyyy HH:mm:ss" but that doesn't work either.

Kind regards,

Richard

Tsvetomir
Telerik team
 answered on 06 Apr 2022
0 answers
118 views

The user edits dates in a grid in D M Y format .. BUT when saved we see an error that indicates it is expecting M D Y format.

Please see attached files.

adamhughes
Top achievements
Rank 1
Iron
Veteran
 asked on 21 Mar 2022
0 answers
91 views
If a user types (keyboard input) a value into the time picker (e.g. 14:10:13) and then clicks away from the field the value resets to 00:00:00.

This behaviour is only observed on a form that has pulled in data (e.g. an Edit Page) with 'DateInput()' applied to the Time Picker.

If the form is empty (e.g. a Create Page) the user can type in a value without having it reset when clicking away from the field.

Can you advise how to fix this?

See Code below:

<div class="k-form-field"> @(Html.Kendo().TimePickerFor(model => model.Time)

.DateInput() .Format("HH:mm:ss") .Interval(15) .ToClientTemplate() ) </div>

Dru
Top achievements
Rank 1
 asked on 24 Jan 2022
Narrow your results
Selected tags
Tags
+? more
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?