I am using jquery datepicker and timepicker.Clicking on date and time it assigns the value to the respective textbox.But I want to do clientside validation like the selected date should be the greater than the current date and selected time should be greater than the current time.Can any one help me how to do this.
A:
var datepicker_1 = $("#datepicker1, #datepicker2");
datepicker_1.datepicker($.extend(datePickerOptions, {
beforeShow: function(input) {
return {
minDate: (input.id == datepicker_1.eq(1).attr('id') ? datepicker_1.eq(0).datepicker("getDate") : null),
maxDate: (input.id == datepicker_1.eq(0).attr('id') ? datepicker_1.eq(1).datepicker("getDate") : null)
};
}
}));
var datepicker_2 = $("#datepicker1, #datepicker2");
datepicker_2.datepicker($.extend(datePickerOptions, {
beforeShow: function(input) {
return {
minDate: (input.id == datepicker_2.eq(1).attr('id') ? datepicker_2.eq(0).datepicker("getDate") : null),
maxDate: (input.id == datepicker_2.eq(0).attr('id') ? datepicker_2.eq(1).datepicker("getDate") : null)
};
}
}));
onder
2010-09-07 06:39:32