DateRangePicker Not Recognized

3 posts, 1 answers
  1. Carter
    Carter avatar
    4 posts
    Member since:
    Nov 2019

    Posted 13 Dec 2019 Link to this post

    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. Answer
    Alex Hajigeorgieva
    Admin
    Alex Hajigeorgieva avatar
    1054 posts

    Posted 17 Dec 2019 Link to this post

    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.
  3. Carter
    Carter avatar
    4 posts
    Member since:
    Nov 2019

    Posted 17 Dec 2019 Link to this post

    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!

Back to Top