Hi everybody
The date values entered in my text boxes (startDate and endDate) in my form are in ISO format YYYY-MM-DD.
Could you please help me and explain how I can compare the date values to make sure the start date is smaller than the end date?
I have something like the following, but it is not working (I guess due to ISO format)
Any tips is extremely appreciated,
Maral
The date values entered in my text boxes (startDate and endDate) in my form are in ISO format YYYY-MM-DD.
Could you please help me and explain how I can compare the date values to make sure the start date is smaller than the end date?
I have something like the following, but it is not working (I guess due to ISO format)
Code:
if ( new Date(document.SearchFrm.startDate.value) > new Date(document.SearchFrm.endDate.value)){
alert ("Start Date is greater");
}
Any tips is extremely appreciated,
Maral
Comment