Yii2 jui datepicker range not working

I am requesting help in 2 topics.

  1. How to debug Javascript in Yii2? Can I have a link to any document?

  2. 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 );

                                    }'),

                    ],

        ])  ?>

Changing ‘clientOptions’ to ‘option’ worked.


'onClose' => new \yii\web\JsExpression('function( getDate ) {

                                    $( "#'.Html::getInputId($model, 'date_to').'" ).datepicker( "option", "minDate", getDate );

                                }'),

I still need help in setting up my environment for JS debugging. Chrome debugger is good for JS files, but I am unable to see the online JS scripts.