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

Date format validation in raddatepicker

1 Answer 220 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
jeevitha
Top achievements
Rank 1
jeevitha asked on 05 Jan 2010, 06:49 AM
Hi,

I am using raddate picker and raddateinput for getting a input date. I need to validate the input date format as mm/dd/yy. I am using OnError function to validate. but it not working properly. is there any alternate way to validate the formate of the datepicker. i am trying to get the text in that dateinput. but i couldnot get if the format is wrong

 <telerik:RadDatePicker ID="textBoxDOB" Skin="Web20" Culture="en-US" Width="100px"
                                    MinDate="01/01/1900" runat="server">
                                    <Calendar ID="CalendarDOB" runat="server" ShowOtherMonthsDays="false" ShowRowHeaders="false"
                                        Skin="WebBlue" BorderWidth="1">
                                    </Calendar>
                                    <DateInput ClientEvents-OnError="OnError" runat="server" ID="raddateDOB" Culture="en-US"
                                          MaxLength="10" ReadOnly="false" MinDate="01/01/1900"  >
                                    </DateInput>
                                    <DatePopupButton HoverImageUrl="../Images/calendar.png" ImageUrl="../Images/calendar.png" />
                                </telerik:RadDatePicker>




function OnError(sender, args) {
                 alert('Invalid date');
                
            }
Thanks,
Jeevitha

1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 05 Jan 2010, 02:58 PM
Hi Weft,

I recommend you examine the following forum thread which elaborates on similar subject and let me know if it helps for you.
http://www.telerik.com/community/forums/aspnet-ajax/calendar/date-validation-for-raddatepicker-control.aspx

Kind regards,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Calendar
Asked by
jeevitha
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or