Skip to content

Commit

Permalink
Added disabled weekdays and disabled days
Browse files Browse the repository at this point in the history
  • Loading branch information
cliffparnitzky committed Aug 17, 2021
1 parent 2ea74a8 commit 15d352d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Resources/contao/templates/forms/form_calendarfield.html5
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ if (!empty($this->dateCssTheme)) {
"wrap": true,
<?php endif; ?>
<?php if (!empty($this->disabledWeekdays) || !empty($this->disabledDays)): ?>
"disable": [<?php if (!empty($this->disabledDays)): ?><?= implode(',', $this->disabledDays) ?>,<?php endif; ?>
"disable": [<?php if (!empty($this->disabledDays)): ?>"<?= implode('","', $this->disabledDays) ?>",<?php endif; ?>
<?php if (!empty($this->disabledWeekdays)): ?>
function(date) {
return ([<?= implode(',', $this->disabledWeekdays) ?>].indexOf(date.getDay()) > 0);
return ([<?= implode(',', $this->disabledWeekdays) ?>].indexOf(date.getDay()) != -1);

}
<?php endif; ?>
Expand Down

0 comments on commit 15d352d

Please sign in to comment.