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

RadDatePicker not validating with RequiredFieldValidator

3 Answers 111 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Mark Oliver
Top achievements
Rank 1
Mark Oliver asked on 29 Nov 2010, 03:47 AM
Hi there,

I have an ASP.net wizard control, with a RadDatePicker on one of the steps. I have added a RequiredFieldValidator as per this documentation. 

Unfortunately, the validator isn't firing when I enter an invalid date, and I can move to the next step in the wizard. If I move to the next step, then return to the previous step and enter an invalid date, it then fires.

My code for the RadDatePicker and Validator is as below:
<telerik:RadDatePicker ID="rdpMAEDROut" Runat="server" Culture="en-US">
    <Calendar UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False"
            ViewSelectorText="x" daynameformat="Short" showrowheaders="False"></Calendar>
    <DatePopupButton ImageUrl="" HoverImageUrl=""></DatePopupButton>
    <DateInput DisplayDateFormat="dd/MM/yyyy" DateFormat="dd/MM/yyyy"
            emptymessage="dd/mm/yyyy" CssClass="RDPInvalid"></DateInput>
</telerik:RadDatePicker>
<asp:RequiredFieldValidator CssClass="RequiredFieldValidator"
        ID="rfvMAEDROut" runat="server"
     ControlToValidate="rdpMAEDROut"
        ErrorMessage="You must enter a valid value in this field." ></asp:RequiredFieldValidator>

Any ideas would be greatly appreciated :)

3 Answers, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 30 Nov 2010, 04:30 PM
Hello Mark,

I tried to replicate the described issue using your code but to no avail. Please find attached a sample project which works as expected on my side. test it locally and let me know what the difference in your case is.

Best wishes,

Maria Ilieva
the Telerik team

 

Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Mark Oliver
Top achievements
Rank 1
answered on 01 Dec 2010, 09:09 PM
Thanks Maria, I discovered that my problem was occurring when I entered an invalid date, cleared it and entered a valid date, then cleared it again and entered an invalid date. It would then let me through to the next page. I have upgraded to the latest version of the controls, and this seems to have fixed it.
0
Maria Ilieva
Telerik team
answered on 02 Dec 2010, 04:11 PM
Hello Mark,

I'm glad that the problem has been fixed. Do not hesitate to contact us back if further issues appear.


Best wishes,
Maria Ilieva
the Telerik team

Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
Calendar
Asked by
Mark Oliver
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Mark Oliver
Top achievements
Rank 1
Share this question
or