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

DatePicker initialy shows today's date wihtout setting a value

5 Answers 90 Views
Date/Time Pickers
This is a migrated thread and some comments may be shown as answers.
Marco
Top achievements
Rank 1
Iron
Marco asked on 08 Nov 2019, 09:31 AM

I just updated my application to use version 2019.3.1023. While testing I noticed that all DatePicker's are displayed whit today's date by default without setting a value. Is this by design?

 

Kind Regards,

Marco

5 Answers, 1 is accepted

Sort by
0
Marco
Top achievements
Rank 1
Iron
answered on 08 Nov 2019, 09:37 AM
It's only applicable to templates which are bound to a view model.
0
Denitsa
Telerik team
answered on 12 Nov 2019, 09:40 AM

Hi Marco,

Thank you for reporting this.

I've tried to reproduce the problem in this dojo but I was not able to at first glance.

Could you please give more details about how to reproduce it? Do you initialize the date at some point?

Kind Regards,
Denitsa
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Marco
Top achievements
Rank 1
Iron
answered on 12 Nov 2019, 10:05 AM

Hi Denitsa,

Your example works fine. I'm using a custom template for the editor of the scheduler control. I'm binding the DatePicker to the value of event.myDate on the view model via the name attribute:

<tr>
     <td style="text-align:right;"><label>My Date</label></td>
     <td><input name="event.myDate" data-role="datepicker" id="editEventATermeDatum" /></td>
</tr>

 

Kind Regards,

Marco

0
Accepted
Denitsa
Telerik team
answered on 13 Nov 2019, 03:41 PM

Hi Marco,

Scheduler control is using today's date as default date, if no current date is configured

If you have observed different behaviour in previos Kendo UI version, could tell us which one?

Would you send us a runnable project where the behavior is replicated? This will enable us to better examine the issue and look for its cause.

 

Kind regards,
Denitsa
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Marco
Top achievements
Rank 1
Iron
answered on 13 Nov 2019, 03:46 PM

Hi Denitsa,

I believe that version kendoui.for.jquery.2019.2.514.commercial didn't had this side effect. I already fixed this is issue by resetting the DatePicker to null.

 

Thread can be closed.

 

Kind Regards,

Marco

Tags
Date/Time Pickers
Asked by
Marco
Top achievements
Rank 1
Iron
Answers by
Marco
Top achievements
Rank 1
Iron
Denitsa
Telerik team
Share this question
or