yii2 datepicker disable dates using javascript
Your date is in the wrong format. It should be specified as:
$("#w0").datepicker("setDatesDisabled", ['08/25/2017']);
Of course make sure that w0
is the correct ID for the input
element... it might also be that your selector doesn't match the input
.
I've verified on the demo page that entering this in the browser's console correctly disables Aug 28:
$('#sandbox-container input').datepicker("setDatesDisabled", ['08/28/2017']);