var d1 = document.getElementById(FinalControlID2).value.split('/'); from date
var d2 = document.getElementById(FinalControlID3).value.split('/');todate
var d3 = document.getElementById("hidTodayDate").value.split('-');
var TodayDate = new Date(d3[1]+'/'+d3[0]+'/'+d3[2]);
var StartTime = document.getElementById(FinalControlID5).value;
var EndTime = document.getElementById(FinalControlID6).value;
if(StartTime != "" && EndTime != "")
{
var StartTime = new Date(d1[1]+'/'+d1[0]+'/'+d1[2] + ' ' +StartTime);
var EndTime = new Date(d2[1]+'/'+d2[0]+'/'+d2[2] + ' ' +EndTime);
var StartTime = TodayDate.setTime(StartTime)
var EndTime = TodayDate.setTime(EndTime)
if(StartTime == EndTime)
{
alert("Start Time and End Time can not be same!")
document.getElementById(FinalControlID6).focus();
return false;
}
// alert(StartTime > EndTime)
if(StartTime > EndTime)
{
alert("End Time should not be less than Start time!")
document.getElementById(FinalControlID6).focus();
return false;
}
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment