Reputation: 652
Hi I have a bootstrap datepicker. I want to grey out all past dates plus the date today on the calendar. I know that I can grey out all past dates with this:
<script type="text/javascript">
$(function () {
$('#delayed-spiffdate').datepicker({
startDate: '-0d'
});
});
But how do I grey out the current date? Thanks.
Upvotes: 0
Views: 83
Reputation: 2873
War10ck's answer is the cleanest. Worth noting, you can also set your datepicker parameters to whatever you like using a date object. Here's another answer that also works:
$(function () {
$('#delayed-spiffdate').datepicker({
startDate: new Date(new Date().getTime() + 24 * 60 * 60 * 1000)
});
});
Upvotes: 0