Click here to Skip to main content
15,893,663 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Please help for start date and end date validate in jquery.

I have used the below code but is not working-

C#
var fDate = new Date(fD);
                   var tDate = new Date(tD);
                   if (fDate > tDate) {
                       alert("To date should be greater than From Date")
                       return false;



Please help for same.

Thanking ....
Posted

1 solution

see this jsfiddle example

http://jsfiddle.net/jinglesthula/dESz2/[^]

This example is a good one, it has date time picker and you will not allow to select back date on to field after you selected from field

http://jsfiddle.net/jquerybyexample/CkfDP/[^]
 
Share this answer
 
v2
Comments
Pramod Singh (C) 17-Sep-14 6:38am    
I have no use datepicker , I am puting date manual like '11/11/2015'.
Gihan Liyanage 17-Sep-14 6:42am    
So then you can use 1st example

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