Click here to Skip to main content
15,890,512 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
i struggle in problem of validation a javascript using mvc3 web application, now my problem is i had done my validation part of choosing a date but it doesn't working my validation is end date is not less than my start end .. pls Help if you have any solution for this problem......
Posted
Comments
Sandeep Mewara 13-Jun-12 6:00am    
Share what you did and is not working.

1 solution

TRY THIS
C#
var startDate = new Date($('#startDate').val());
var endDate = new Date($('#endDate').val());

if (startDate < endDate){
// Do something
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900