Lines 516-558
td.repeatableyearly a.ui-state-default { background: #FFCC66 none; color : Bl
Link Here
|
516 |
$(this).parent().find(".hint").toggle(); return false; |
516 |
$(this).parent().find(".hint").toggle(); return false; |
517 |
}); |
517 |
}); |
518 |
$("#dateofrange").datepicker({ |
518 |
$("#dateofrange").datepicker({ |
519 |
beforeShow: function() { |
519 |
beforeShow: function() { |
520 |
var startdate = $("#jcalendar-container").datepicker("getDate"); |
520 |
var startdate = $("#jcalendar-container").datepicker("getDate"); |
521 |
if (startdate !== null) { |
521 |
if (startdate !== null) { |
522 |
var sd = new Date(startdate); |
522 |
var sd = new Date(startdate); |
523 |
var ed = new Date($(this).datepicker("getDate")); |
523 |
var ed = new Date($(this).datepicker("getDate")); |
524 |
if (ed < sd) { |
524 |
if (ed < sd) { |
525 |
$(this).datepicker("setDate", startdate); |
525 |
$(this).datepicker("setDate", startdate); |
526 |
$(this).datepicker("option", "defaultDate", startdate); |
526 |
$(this).datepicker("option", "defaultDate", startdate); |
527 |
} |
527 |
} |
|
|
528 |
} |
528 |
} |
529 |
} |
529 |
} |
|
|
530 |
}); |
530 |
}); |
531 |
$("#datecancelrange").datepicker(); |
531 |
$("#datecancelrange").datepicker(); |
532 |
$("#dateofrange").each(function () { this.value = "" }); |
532 |
$("#dateofrange").each(function () { this.value = "" }); |
533 |
$("#datecancelrange").each(function () { this.value = "" }); |
533 |
$("#datecancelrange").each(function () { this.value = "" }); |
534 |
$("#jcalendar-container").datepicker({ |
534 |
$("#jcalendar-container").datepicker({ |
535 |
beforeShowDay: function(thedate) { |
535 |
beforeShowDay: function(thedate) { |
536 |
var day = thedate.getDate(); |
536 |
var day = thedate.getDate(); |
537 |
var month = thedate.getMonth() + 1; |
537 |
var month = thedate.getMonth() + 1; |
538 |
var year = thedate.getFullYear(); |
538 |
var year = thedate.getFullYear(); |
539 |
var dateString = year + '/' + month + '/' + day; |
539 |
var dateString = year + '/' + month + '/' + day; |
540 |
return dateStatusHandler(dateString); |
540 |
return dateStatusHandler(dateString); |
541 |
}, |
541 |
}, |
542 |
onSelect: function(dateText, inst) { |
542 |
onSelect: function(dateText, inst) { |
543 |
dateChanged($(this).datepicker("getDate")); |
543 |
dateChanged($(this).datepicker("getDate")); |
544 |
var enddate = $("#dateofrange").datepicker("getDate"); |
544 |
var enddate = $("#dateofrange").datepicker("getDate"); |
545 |
$("#dateofrange").datepicker("option", "defaultDate", $(this).datepicker("getDate")); |
545 |
$("#dateofrange").datepicker("option", "defaultDate", $(this).datepicker("getDate")); |
546 |
if (enddate !== null) { |
546 |
$("#dateofrange").datepicker( "option", "minDate", $(this).datepicker("getDate")); //ensure end date can't be before start date |
547 |
var ed = new Date(enddate); |
547 |
if (enddate !== null) { |
548 |
var sd = new Date($(this).datepicker("getDate")); |
548 |
var ed = new Date(enddate); |
549 |
if (ed < sd) { |
549 |
var sd = new Date($(this).datepicker("getDate")); |
550 |
$("#dateofrange").datepicker("setDate", $(this).datepicker("getDate")); |
550 |
if (ed < sd) { |
551 |
$("#dateofrange").datepicker("option", "defaultDate", enddate); |
551 |
$("#dateofrange").datepicker("setDate", $(this).datepicker("getDate")); |
552 |
} |
552 |
$("#dateofrange").datepicker("option", "defaultDate", enddate); |
553 |
} |
553 |
} |
554 |
}, |
554 |
} |
555 |
defaultDate: new Date("[% keydate | html %]") |
555 |
}, |
|
|
556 |
defaultDate: new Date("[% keydate | html %]") |
556 |
}); |
557 |
}); |
557 |
$(".hidePanel").on("click",function(){ |
558 |
$(".hidePanel").on("click",function(){ |
558 |
if( $(this).hasClass("showHoliday") ){ |
559 |
if( $(this).hasClass("showHoliday") ){ |
559 |
- |
|
|