check date using javascript

Posted by Klbaiju under JavaScript on 3/31/2012 | Points: 10 | Views : 1292 | Status : [Member] | Replies : 1
hi,

my application contains 2 textboxes contains date in format
mm/dd/yyyy.onblur event of second text box i want to check second text box contains big date.

how it is possible in javascript


Regards

K L BAIJU




Responses

Posted by: Hmanjarawala on: 3/31/2012 [Member] Bronze | Points: 25

Up
0
Down
Hi ty this:

var start_date= new Date(start_date_in_whatever_format);
var end_date= new Date(end_date_in_whatever_format);

if (eval(end_date - start_date)<0){

alert("Invalid date range.");
return false;
}



Himanshu Manjarawala
Sr. Software Engineer@AutomationAnywhere
http://fieredotnet.wordpress.com/

Klbaiju, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response