Fix #274 -- Disable weekends in datetimepicker for expiry (#320)

* Fix for Disable weekends in datetimepicker for expiry #274

* minor fixes from review
This commit is contained in:
Christopher Dambamuromo
2016-11-17 22:39:48 +01:00
committed by Raphael Michel
parent 94461b36ba
commit bac9960d0c
5 changed files with 15 additions and 4 deletions
+5 -2
View File
@@ -127,7 +127,7 @@ $(function () {
});
$(".datepickerfield").each(function() {
$(this).datetimepicker({
var opts = {
format: $("body").attr("data-dateformat"),
locale: $("body").attr("data-datetimelocale"),
useCurrent: false,
@@ -143,7 +143,10 @@ $(function () {
clear: 'fa fa-trash',
close: 'fa fa-remove'
}
});
};
if ($(this).is('[data-is-payment-date]'))
opts["daysOfWeekDisabled"] = JSON.parse($("body").attr("data-payment-weekdays-disabled"));
$(this).datetimepicker(opts);
});
$(".qrcode-canvas").each(function() {