DatePicker with DateInput fails to be initialized - both TagHelper and HtmlHelper

1 Answer 189 Views
Date/Time Pickers DateInput
Gordon
Top achievements
Rank 1
Iron
Gordon asked on 27 Jul 2023, 09:16 AM

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

1 Answer, 1 is accepted

Sort by
0
Mihaela
Telerik team
answered on 31 Jul 2023, 09:04 AM

Hello Gordon,

I have tested both configurations (Html and Tag helper versions) of the DatePicker with the latest Telerik UI for ASP.NET Core (version 2023.2.718) and jQuery 3.3.1, and it appears that the editors are rendered as expected at my end, without any client-side errors. I am attaching a runnable sample for your reference.

Would you please try reproducing the behavior you are experiencing in the attached demo project and send it back to me for review? It will help me to get a better understanding of your scenario and diagnose the issue further.

Regards, Mihaela Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages. If you're new to the Telerik family, be sure to check out our getting started resources, as well as the only REPL playground for creating, saving, running, and sharing server-side code.
Gordon
Top achievements
Rank 1
Iron
commented on 08 Aug 2023, 10:40 PM

Hi Hihaela,

I incorrectly stated the version of Kendo that I was using.  The version is 2023.2.606.

How can I tell what has been fixed between version updates?  If it is working in 2023.2.718 then something must have changed but I can't tell by looking in my account.

Gordon

Mihaela
Telerik team
commented on 10 Aug 2023, 02:58 PM

Hello Gordon,

Thank you for your clarification.

I have tested the previously shared sample with Telerik UI for ASP.NET Core version 2023.2.606, but I still cannot reproduce the aforementioned error:

With that being said, would you please let me know if there is any accompanying custom JS logic related to the DatePickers at your end?

Also, are these DatePickers integrated into another UI component?

 

Tags
Date/Time Pickers DateInput
Asked by
Gordon
Top achievements
Rank 1
Iron
Answers by
Mihaela
Telerik team
Share this question
or