$("#cal2").click(function () {
$("#date2").datepicker("show");
});
-
+ today = new Date();
+ minDays = 2;
+ today.setDate(today.getDate() + minDays);
+ d = today.getDate();
+ if (d <= 9) {
+ d = '0' + d;
+ }
+ m = today.getMonth() + 1;
+ if (m <= 9) {
+ m = '0' + m;
+ }
+ y = today.getFullYear();
+ requiredDate = y + '-' + m + '-' + d;
+ $("#dateOff1").val(requiredDate);
// restrict datepicker for days after current date and 2 days after that date [min]
$("#dateOff1").change(function () {
currentDate = $("#dateOff1").val();
y = today.getFullYear();
requiredDate = y + '-' + m + '-' + d;
if (currentDate !== requiredDate) {
- alert("bo");
+
}
});
$("#cal2").click(function () {
$("#date2").datepicker("show");
});
-
+ today = new Date();
+ minDays = 2;
+ today.setDate(today.getDate() + minDays);
+ d = today.getDate();
+ if (d <= 9) {
+ d = '0' + d;
+ }
+ m = today.getMonth() + 1;
+ if (m <= 9) {
+ m = '0' + m;
+ }
+ y = today.getFullYear();
+ requiredDate = y + '-' + m + '-' + d;
+ $("#dateOff1").val(requiredDate);
// restrict datepicker for days after current date and 2 days after that date [min]
$("#dateOff1").change(function () {
currentDate = $("#dateOff1").val();
y = today.getFullYear();
requiredDate = y + '-' + m + '-' + d;
if (currentDate !== requiredDate) {
- alert("bo");
+
}
});