Created
August 29, 2019 17:24
-
-
Save stefanpoensgen/b1148b8eccf23b5b845b073bc4079c5a to your computer and use it in GitHub Desktop.
Only allow Monday, Tuesday or Wednesday in Shopware Datepicker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.overridePlugin('swDatePicker', { | |
initFlatpickr: function () { | |
var me = this; | |
me.opts.disable = [ | |
function (date) { | |
return (date.getDay() > 3 || date.getDay() === 0); | |
} | |
]; | |
me.superclass.initFlatpickr.apply(this, arguments); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment