WaterMark in RadDatePicker + issues in validation

5 posts, 0 answers
  1. Ash
    Ash avatar
    14 posts
    Member since:
    Mar 2012

    Posted 21 May 2012 Link to this post

    Hi,

    I want to add the date format as a  watermark to the datepicker. How can i do that?

    Also,
    when the format of the datepicker is dd/MM/yyyy. If i enter 05/20/2012 (manually) , in that case a postback occurs and the datepicker automatically changes the date to 20/05/2012.

    I do not want this to happen, i want an error to be thrown as the user has to input the date in dd/MM/yyyy format only, and it has to be validated against that format.

    Please let me know how i can implement the above.

  2. Vasil
    Admin
    Vasil avatar
    1638 posts

    Posted 24 May 2012 Link to this post

    Hi Ash,

    The picker will try to parse the value using all possible formats that it supports.
    If you need to avoid that, you can handle the onValueChanging event and cancels it, parsing the text yourself.

    Kind regards,
    Vasil
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. Ash
    Ash avatar
    14 posts
    Member since:
    Mar 2012

    Posted 29 May 2012 Link to this post

    thanks for the reply.

    how do i create a custom raddatepicker control? i dont want to implement the same event in each and every page.
  4. Vasil
    Admin
    Vasil avatar
    1638 posts

    Posted 30 May 2012 Link to this post

    Hello Ash,

    You can make Asp User Control with picker inside and the required script.

    All the best,
    Vasil
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  5. Ash
    Ash avatar
    14 posts
    Member since:
    Mar 2012

    Posted 04 Jun 2012 Link to this post

    Thanks for the information.

    I am handling the extra conditions in ValueChanging Event.
    When i want to throw an error, for consistency i want it to look the same way as it does when telerik throws an error for date validation.
    How can i achieve the same?

    i want to show the error with the red outline and Exclamation in a triange.
Back to Top