DatePicker StartDate cannot equal to EndDate
Hi,
How to disable the date selection so that StartDate and EndDate is not equal.
For example, if I selected the StartDate is "16/01/2013", then in EndDate I should only able to select start from "17/01/2013" until current date. And if EndDate is "20/01/2013", then selection date for StartDate should start from any date until "19/01/2013".
Below is my code, I don't know what should I add to match with the requirement:
- $(function () {
- $("#startDate").datepicker({
- maxDate: 0,
- onClose: function (selectedDate) {
- $("#endDate").datepicker("option", "minDate", selectedDate);
- }
- });
- $("#endDate").datepicker({
- maxDate: 0,
- onClose: function (selectedDate) {
- $("#startDate").datepicker("option", "maxDate", selectedDate);
- }
- });
- });
Please guide/help.
Thanks.