DatePickerFor stopped working with latest update

3 posts, 0 answers
  1. Bryan
    Bryan avatar
    24 posts
    Member since:
    Nov 2013

    Posted 16 Nov 2014 Link to this post

    I've been developing an app for some time now using the Kendo UI MVC wrappers. I just updated my Telerik components with version 2014.2.1008 this weekend. All of a sudden, the DatePickerFor is not working correctly for nullable DateTime values where it had been working before. Instead of a non-null date value being displayed, I see something like {0:17} in the edit box and it won't validate.

    Assuming my model has a property like this:

         public DateTime? DueDate { get; set; }

    The following .cshtml markup produces the erroneous result:

        @Html.Kendo().DatePickerFor(model => model.DueDate)

    The following .cshtml markup produces the correct result, but I can't use it because the value may be null:

        @Html.Kendo().DatePickerFor(model => model.DueDate.Value)

    I can't deploy other code I've been working on tonight because of this problem. I need a resolution to this ASAP.
  2. James
    James avatar
    37 posts
    Member since:
    Sep 2014

    Posted 17 Nov 2014 in reply to Bryan Link to this post

    I am having the same issue.  Please update with a resolution.
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Bryan
    Bryan avatar
    24 posts
    Member since:
    Nov 2013

    Posted 17 Nov 2014 in reply to James Link to this post

    I got this support ticket reply from Telerik:

    Hello Bryan,This is a known bug, which slipped out in the service pack release. We introduced a feature that sets the Model DataFormatString value to the widget format value automatically. However, the format is not set correctly. The problem can be overcome using the Format method of the wrapperThe bug is addressed in the last internal build. The next official release is due the mid of this week.Regards,
    Georgi Krustev
    Telerik
Back to Top