This is my code
<?= $form->field($model, ‘booking_date’)->widget(DatePicker::classname(), [
'options' => ['placeholder' => '',
'id'=>'avail_date',
'onchange'=>'
$.get( "'.Url::toRoute('doctors/avail_search').'", { id: $(this).val() } )
.done(function( data )
{
$( "select#avail_practice'.$user->id.'" ).html( data );
});
'
],
'readonly' => false,
'pluginOptions' => [
'autoclose' => true,
'format' => 'dd-mm-yyyy',
'value'=>date('d-m-Y'),
'todayHighlight' => true,
'todayBtn' => true,
'pickerPosition'=> "bottom-right",
]
]);
?>
<label>Location</label>
<?php
$location=ArrayHelper::map(DoctorAdditionalPractice::find()->where('doctor_id=:doctor',['doctor'=>$id])->all(), 'id','name');
echo $form->field($model,'doc_practice_locatoin_id')->dropDownList($location,['id'=>'avail_practice'.$user->id.'',
'prompt'=>'Select',
'onchange'=>'
$.get( "'.Url::toRoute('doctors/avail_slot').'", { id: $(this).val()} )
.done(function( data )
{
$( "select#avail_s'.$user->id.'" ).html( data );
});
'
])->label('');
?>
how to pass booking_date as parameter on location onchange url…Please help