i have a textbox that has jquery datepicker,...
How to validate, so that to date should be greater than from date.
 
 @Html.EditorFor(m => m.Fromdate, new { id = "datepicker1" })
 @Html.EditorFor(m => m.Todate, new { id = "datepicker2" })
 
 $("#datepicker1").datepicker({ minDate: -20, maxDate: "+20D" });
        $("#datepicker2").datepicker({ minDate: -20, maxDate: "+20D" });