This is a migrated thread and some comments may be shown as answers.
DateRangePicker Not Recognized
2 Answers 11 Views
This is a migrated thread and some comments may be shown as answers.
Carter
Top achievements
Rank 1
Carter asked on 13 Dec 2019, 08:02 PM

I am trying to use the DateRangePicker in Telerik for ASP.NET MVC. I am using the latest version of Telerik and ASP.NET MVC. However, I get the following error, both in the editor and at runtime (so it's not an Intellisense issue):

Kendo.Mvc.UI.Fluent.WidgetFactory<System.Collections.Generic.List<KPIView_MVC.Models.KPIData>> does not contain a definition for 'DateRangePicker' and no extension method 'DateRangePicker' accepting a first argument of type Kendo.Mvc.UI.Fluent.WidgetFactory<System.Collections.Generic.List<KPIView_MVC.Models.KPIData>> could be found

How can I get it to work correctly?

 

2 Answers, 1 is accepted

Sort by
0
Accepted
Alex Hajigeorgieva
Telerik team
answered on 17 Dec 2019, 12:01 PM

Hi, Carter,

It looks like the Kendo.Mvc.dll which is referenced in the project is an older one. Can you verify which version the dll points to as the DateRangePicker became available in R1 2019?

In addition to that, do you have any issues with other widgets, for example can you include this in the view and let us know if you get any errors:

 @(Html.Kendo().DatePicker()
    .Name("datepicker")
    .Value("10/10/2011")
    .HtmlAttributes(new { style = "width: 100%", title = "datepicker" })
)

Adding the Kendo.Mvc.dll documentation reference is available at:

https://docs.telerik.com/aspnet-mvc/getting-started/first-steps#adding-the-kendomvcdll-reference

Look forward to hearing back from you.

Kind Regards,
Alex Hajigeorgieva
Progress Telerik

Get quickly onboarded and successful with your Telerik UI for ASP.NET MVC with the dedicated Virtual Classroom technical training, available to all active customers.
0
Carter
Top achievements
Rank 1
answered on 17 Dec 2019, 04:57 PM

Hi there, thanks for the reply. I don't have issues with other widgets I've been using; in fact, while waiting for a response I've just temporarily switched over to two DatePicker widgets, so that's fine.

The Kendo.Mvc dll is version 2017.3.1026.545 according to the properties pane in Visual Studio, so it does seem that that is in fact my problem. That's weird, though, since I thought I made this project with the newest version of Telerik for ASP.NET MVC (I only just created the project in November of this year). I've updated my project's version of Telerik and confirmed that this fixed the issue. Thank you!

Asked by
Carter
Top achievements
Rank 1
Answers by
Alex Hajigeorgieva
Telerik team
Carter
Top achievements
Rank 1
Share this question
or