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

RatdDateTimePicker validate entered date problem

2 Answers 85 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Ihab
Top achievements
Rank 1
Ihab asked on 09 Apr 2010, 02:34 PM
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 Answers, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 12 Apr 2010, 03:19 PM
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.
0
Bill Witt
Top achievements
Rank 1
answered on 12 May 2010, 01:52 PM
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
Tags
Calendar
Asked by
Ihab
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Bill Witt
Top achievements
Rank 1
Share this question
or