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

Bug with MinDate when clicking Calendar

2 Answers 53 Views
DatePicker
This is a migrated thread and some comments may be shown as answers.
Allen
Top achievements
Rank 1
Allen asked on 05 Aug 2016, 02:44 PM

I have a RadDatePicker inside an asp:ListView that I am having an issue with.

When the page loads I am setting the minDate on the code behind and the control renders like this:

<span id="ctl00_body_lvWorkLog_ctrl18_rdpEndDateEdit_dateInput_wrapper" class="riSingle RadInput RadInput_Simple" style="display:block;width:100%;"><input id="ctl00_body_lvWorkLog_ctrl18_rdpEndDateEdit_dateInput" name="ctl00$body$lvWorkLog$ctrl18$rdpEndDateEdit$dateInput" class="riTextBox riEnabled" value="8/13/2016" type="text"><input id="ctl00_body_lvWorkLog_ctrl18_rdpEndDateEdit_dateInput_ClientState" name="ctl00_body_lvWorkLog_ctrl18_rdpEndDateEdit_dateInput_ClientState" type="hidden" autocomplete="off" value="{"enabled":true,"emptyMessage":"","validationText":"2016-08-13-00-00-00","valueAsString":"2016-08-13-00-00-00","minDateStr":"2016-04-13-00-00-00","maxDateStr":"2099-12-31-00-00-00","lastSetTextBoxValue":"8/13/2016"}"></span>

You can see that the minDateStr renders properly.

The bug happens when I click on the calendar to change the date. The control goes into an invalid state because the minDateString turns into "NaN" like so:

<span id="ctl00_body_lvWorkLog_ctrl18_rdpEndDateEdit_dateInput_wrapper" class="riSingle RadInput RadInput_Simple" style="display:block;width:100%;"><input id="ctl00_body_lvWorkLog_ctrl18_rdpEndDateEdit_dateInput" name="ctl00$body$lvWorkLog$ctrl18$rdpEndDateEdit$dateInput" class="riTextBox riError" value="8/13/2016" type="text"><input id="ctl00_body_lvWorkLog_ctrl18_rdpEndDateEdit_dateInput_ClientState" name="ctl00_body_lvWorkLog_ctrl18_rdpEndDateEdit_dateInput_ClientState" type="hidden" autocomplete="off" value="{"enabled":true,"emptyMessage":"","validationText":"","valueAsString":"","minDateStr":"NaN-NaN-NaN-NaN-NaN-NaN",";maxDateStr":"2099-12-31-00-00-00","lastSetTextBoxValue":"8/13/2016"}"></span>

 

I am using Telerik version: 2016.1.225.45

On Windows 10

Using Google Chrome version: 51.0.2704.106 m

2 Answers, 1 is accepted

Sort by
0
Allen
Top achievements
Rank 1
answered on 05 Aug 2016, 09:58 PM

A few more details about this problem.

It is not limited to just Chrome. It also throws this error in Firefox, Edge, and IE.

Also, I develop using VS 2015 using C#

0
Maria Ilieva
Telerik team
answered on 10 Aug 2016, 11:30 AM
Hi Allen,

Can you please share the RadListView markup and related code behind so that we can revise your code locally and advise you further?

Regards,
Maria Ilieva
Telerik by Progress
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Tags
DatePicker
Asked by
Allen
Top achievements
Rank 1
Answers by
Allen
Top achievements
Rank 1
Maria Ilieva
Telerik team
Share this question
or