but i want to display a time for 12hours format how to do any examples if you know please help me to solve ................................
THIS IS MY CODE:
ToolTip="Please Select 24Hours Time Format" Display="Dynamic">
function Time1(source, args) {
var Timedata = $("#<%=txtTime.ClientID %>").val();
if (Timedata != "") {
var timeArray = Timedata.split(':');
if (timeArray[0] > 0 && timeArray[0] <= 23) {
if (timeArray[1] <= 59 && timeArray[2] <= 59) {
args.IsValid = true;
}
else {
args.IsValid = false;
}
}
else {
args.IsValid = false;
}
}
else {
args.IsValid = false;
}
}
Jignesh TrivediPosted Apr 8, 2013, 8:53 AM
hi,
first of all if your date time picker is return time value in 24h than you have to convert it in 12h format.
http://stackoverflow.com/questions/4898574/converting-24-hour-time-to-12-hour-time-w-am-pm-using-javascript
in your code, please modify Time1 function(validate time).
hope this will help you.