I have 2 RadTimePickers on my page, example:
I want to validate the value as a valid time, client-side, which looks very possible because it validates already visually by turning red with a caution icon.
I get the input value like this:
but that returns the value whether valid or not.
In the mark-up I can see there is a clientstate hidden input, and there is a "validationText" sub-value that is an empty string when not valid or a date when valid. I could use this I think but not sure how to grab it. Here is what that markup looks like:
Any help is appreciated, thanks.
Coty
<telerik:RadTimePicker ID="rtpStartTime" TimeView-HeaderText="Start Time" runat="server" Width="90px" TimeView-Interval="0:15:0" TimeView-StartTime="7:0:0" TimeView-EndTime="17:0:0"></telerik:RadTimePicker>I want to validate the value as a valid time, client-side, which looks very possible because it validates already visually by turning red with a caution icon.
I get the input value like this:
$("input[id$=rtpStartTime_dateInput").val()In the mark-up I can see there is a clientstate hidden input, and there is a "validationText" sub-value that is an empty string when not valid or a date when valid. I could use this I think but not sure how to grab it. Here is what that markup looks like:
<input id="ctl00_ContentPlaceHolder1_rtpStartTime_dateInput_ClientState" name="ctl00_ContentPlaceHolder1_rtpStartTime_dateInput_ClientState" type="hidden" autocomplete="off" value="{"enabled":true,"emptyMessage":"","validationText":"2014-06-12-05-00-00","valueAsString":"2014-06-12-05-00-00","minDateStr":"1980-01-01-00-00-00","maxDateStr":"2099-12-31-00-00-00","lastSetTextBoxValue":"5:00 AM"}">Any help is appreciated, thanks.
Coty