I am requesting help in 2 topics.
-
How to debug Javascript in Yii2? Can I have a link to any document?
-
What is wrong in the following code? The minDate is not getting set in the datepicker.
<?= $form->field($model, 'date_from')->widget(\yii\jui\DatePicker::classname(), [
'dateFormat' => 'dd/MM/yyyy',
'clientOptions' =>
[
'numberOfMonths' => 3,
"changeMonth" => true,
'onClose' => new \yii\web\JsExpression('function( getDate ) {
$( "#reservation-date_to" ).datepicker( "clientOptions", "minDate", getDate );
}'),
],
]) ?>