Date format validation in raddatepicker

2 posts, 0 answers
  1. jeevitha
    jeevitha avatar
    63 posts
    Member since:
    Sep 2008

    Posted 05 Jan 2010 Link to this post


    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">
                                        <DateInput ClientEvents-OnError="OnError" runat="server" ID="raddateDOB" Culture="en-US"
                                              MaxLength="10" ReadOnly="false" MinDate="01/01/1900"  >
                                        <DatePopupButton HoverImageUrl="../Images/calendar.png" ImageUrl="../Images/calendar.png" />

    function OnError(sender, args) {
                     alert('Invalid date');
  2. Pavlina
    Pavlina avatar
    6187 posts

    Posted 05 Jan 2010 Link to this post

    Hi Weft,

    I recommend you examine the following forum thread which elaborates on similar subject and let me know if it helps for you.

    Kind regards,
    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.
Back to Top