Restrict calendar picker to Sundays only
This commit is contained in:
parent
336f8cfbe8
commit
2e5c43428f
@ -41,7 +41,7 @@
|
|||||||
<input class="twelve wide column" type="text" name="date" value="{{ item.date or '' }}">
|
<input class="twelve wide column" type="text" name="date" value="{{ item.date or '' }}">
|
||||||
</div>
|
</div>
|
||||||
</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>
|
</div>
|
||||||
<div class="ui required inline grid field">
|
<div class="ui required inline grid field">
|
||||||
@ -110,6 +110,9 @@
|
|||||||
date: function(date, settings) {
|
date: function(date, settings) {
|
||||||
return date.getFullYear() + '-' + leftpad(date.getMonth() + 1) + '-' + leftpad(date.getDate());
|
return date.getFullYear() + '-' + leftpad(date.getMonth() + 1) + '-' + leftpad(date.getDate());
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
isDisabled: function(date, mode) {
|
||||||
|
return date.getDay() !== 0; // Sunday only
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user