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

RadDatePicker's SelectedDate is null but ValidationDate is not

8 Answers 308 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Seth
Top achievements
Rank 1
Seth asked on 05 Jun 2010, 08:08 PM
I have a RadDatePicker control on a form.  If I input a date manually by typing it it and then immediately click on the form's submit button (so the date picker doesn't lose focus until I click on the button), the date picker on the server side doesn't see the newly inputed value. The IsEmpty is set to false and the SelectedDate is null.  However, the ValidationDate property is set to the correct date, but your documentation says not to use this member so I am not.  If I was to tab out of the date picker before clicking on the button, everything works the way it should. How can I validate and consume this control?

I searched through support for help, but didn't see anything.

Thanks,
Seth

8 Answers, 1 is accepted

Sort by
0
Mira
Telerik team
answered on 10 Jun 2010, 09:03 AM
Hello Seth,

I tried to replicate the issue which you described, but to no avail.
Attached to this message, you will find the code which I used for testing.

Please, take a look at it and let me know if there are any differences at your end, which I may be leaving out.

Sincerely yours,
Mira
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Seth
Top achievements
Rank 1
answered on 17 Jun 2010, 05:38 AM
Sorry for the delay but vacation called :).

Ok, so your sample worked for me right out of the box. So I began adding pieces of my design to your sample till I found the culprit.  If you, directly below the script manager reference, add the following line:
<telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" DecoratedControls="Buttons" /> 

so that you end up with this:
    <div> 
        <asp:ScriptManager ID="ScriptManager2" runat="server"
        </asp:ScriptManager> 
        <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" DecoratedControls="Buttons" /> 
        <telerik:RadDatePicker ID="RadDatePicker1" runat="server"
        </telerik:RadDatePicker> 
        <br /> 
        <button type="submit"
            submit</button> 
    </div> 

You will see that the SelectedDate is null even though the ValidationDate is correct.

Thanks!
0
Maria Ilieva
Telerik team
answered on 22 Jun 2010, 01:27 PM
Hello Seth,

I tested again the application by using the additional information but I’m still not able to replicate the issue. Please find attached the modified project which works correctly on our side.


Sincerely yours,

Maria Ilieva
the Telerik team

 

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Seth
Top achievements
Rank 1
answered on 30 Jun 2010, 09:01 PM
I copied your code over and am still getting the same error.  I am using an older version of the Telerik.Web.UI assembly so I removed my reference and added a reference to the one you included with your sample.  However, I still get the same error.  So I then created a web application on a new, clean Windows 2008 R2 machine that has no Telerik installed and has Visual Studio 2010.  This application, using your code and your Telerik.Web.UI assembly, still shows a null SelectedDate when I click on the submit button after manually entering a date into date picker with keystrokes (so the date picker doesn't lose focus until I click on the submit button),  The ValidationDate property is still showing the correctly input date which is making me want to use this property instead so that I can fix this production issue.

Hopefully this helps you reproduce.

Thanks mucho!
Seth
0
Maria Ilieva
Telerik team
answered on 05 Jul 2010, 02:09 PM
Hello Seth,

I tested again the provided project locally and I'm still not able to replicate the errors you are facing. Please open a regular support ticket and send us sample runnable application which represents your problem. We will test it locally and advise you further.

Kind regards,
Maria Ilieva
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Bogey
Top achievements
Rank 1
answered on 15 Aug 2010, 06:50 PM
Has this issuse been resolved?  I'm having a similar issue with the RADCalendar control.  Clicking a date the first time returns selected date in the click event.  Clicking the same date again returns returns 01/01/001 instead of slected date.  Any ideas what may be causing this?

Thanks
0
Maria Ilieva
Telerik team
answered on 18 Aug 2010, 02:38 PM
Hi Dan,

The issue you are facing is actually the default behavior of the control and currently we do not plan to make changes on it. The second select of the same date is actually unselecting it and the control returns the min available date.


Best wishes,
Maria Ilieva
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Seth
Top achievements
Rank 1
answered on 31 Aug 2010, 05:48 AM
Hi Dan,

Sorry for the delay.  Actually Telerik support was able to figure this one out for us.  This behavior seems to only happen with the html button control.  If you switch over to a asp button or a html input control (type="submit") it should work correctly for you.  At least it worked for us.

Good luck,
Seth
Tags
Calendar
Asked by
Seth
Top achievements
Rank 1
Answers by
Mira
Telerik team
Seth
Top achievements
Rank 1
Maria Ilieva
Telerik team
Bogey
Top achievements
Rank 1
Share this question
or