RatdDateTimePicker validate entered date problem

3 posts, 0 answers
  1. Ihab
    Ihab avatar
    15 posts
    Member since:
    Apr 2009

    Posted 09 Apr 2010 Link to this post

    hi,
    I have a problem of validateing entered date in dateinput of RadeDateTimePicker control client side
    follwoing script is giving me return value of "" when I enterd wrong date or blank

    document.getElementById('ctl00_ContentPlaceHoder1_dtpPrefferedAttendingDateTime').value

    for example entered value like sdsafdgfvfs it returns ""
                       leave it blanke it returns ""
                       entered right date like 01/01/2010 bring correct same date

    I need script to determine wheather it blank or wrong or correct date

    also following script not helping




    script type="text/javascript">
            Telerik.Web.UI.RadDateInput.prototype.parseDate = function(value, baseDate) {
            debugger
                if (new Date(value) != "NaN")
                    return value;
            }   

    any Idea please,
    Ihab


  2. Iana Tsolova
    Admin
    Iana Tsolova avatar
    3388 posts

    Posted 12 Apr 2010 Link to this post

    Hi Ihab,

    Try handling the OnError client-side event as shown here and see if it works for you.

    Best wishes,
    Iana
    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.
  3. Bill Witt
    Bill Witt avatar
    3 posts
    Member since:
    Dec 2008

    Posted 12 May 2010 Link to this post

    Hi Ihab,
    take a look at this post Custom JavaScript Datetime Parser

    I had similar issues after upgrading also.  The project in the link shows how to correctly implement a custom datetime parser.

    Bill
Back to Top