Datepicker start date not same as model date

2 posts, 0 answers
  1. Baldvin
    Baldvin avatar
    13 posts
    Member since:
    Nov 2013

    Posted 10 Mar Link to this post

    Hi,

    I have this in my view:

    @(Html.Kendo().DatePickerFor(model => model.Date).Min(DateTime.Now).Value(@Model.Date).Events(e => e.Change("updateDatePicker")))

    Initially, when you look at the datepicker, it shows you the correct date. But when I click it, it opens with today's date selected instead of the date of my model. For example, the date in my model is july 9th 2016 but when I open the datepicker it opens with march 10th 2016 selected.

    I have searched a lot but haven't found a solution. Any help is greatly appreciated.

  2. Baldvin
    Baldvin avatar
    13 posts
    Member since:
    Nov 2013

    Posted 10 Mar Link to this post

    Solved by using .Events(e => e.Open("onOpen"))

    and then in onOpen I do it manually

  3. UI for ASP.NET MVC is VS 2017 Ready
Back to Top