This is a migrated thread and some comments may be shown as answers.

Datepicker start date not same as model date

1 Answer 52 Views
Date/Time Pickers
This is a migrated thread and some comments may be shown as answers.
Baldvin
Top achievements
Rank 1
Baldvin asked on 10 Mar 2016, 09:58 AM

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.

1 Answer, 1 is accepted

Sort by
0
Baldvin
Top achievements
Rank 1
answered on 10 Mar 2016, 11:56 AM

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

and then in onOpen I do it manually

Tags
Date/Time Pickers
Asked by
Baldvin
Top achievements
Rank 1
Answers by
Baldvin
Top achievements
Rank 1
Share this question
or