Restrict calendar picker to Sundays only

This commit is contained in:
Yingtong Li 2019-01-12 15:26:39 +11:00
parent 336f8cfbe8
commit 2e5c43428f
Signed by: RunasSudo
GPG Key ID: 7234E476BF21C61A

View File

@ -41,7 +41,7 @@
<input class="twelve wide column" type="text" name="date" value="{{ item.date or '' }}">
</div>
</div>
<div style="margin-top: 1.5em;">The item will be scheduled for the first bulletin post on or after this date.</div>
<div style="margin-top: 1.5em;">Choose the date to publish the bulletin item (must be a Sunday).</div>
</div>
</div>
<div class="ui required inline grid field">
@ -110,6 +110,9 @@
date: function(date, settings) {
return date.getFullYear() + '-' + leftpad(date.getMonth() + 1) + '-' + leftpad(date.getDate());
}
},
isDisabled: function(date, mode) {
return date.getDay() !== 0; // Sunday only
}
});