Skip to content

Instantly share code, notes, and snippets.

@stefanpoensgen
Created August 29, 2019 17:24
Show Gist options
  • Save stefanpoensgen/b1148b8eccf23b5b845b073bc4079c5a to your computer and use it in GitHub Desktop.
Save stefanpoensgen/b1148b8eccf23b5b845b073bc4079c5a to your computer and use it in GitHub Desktop.
Only allow Monday, Tuesday or Wednesday in Shopware Datepicker
$.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