I am using the following code in my _form file for yii\jui\DatePicker, on date selection it is showing the date format properly. In gridview the data rendered is OK.
But when I open the record for update the format shown is yyyy-mm-dd, I want to show the same as dd-mm-yyyy
<?= $form->field($model, 'birth_date')->widget(DatePicker::className(),
[
'language' => 'en',
//'DateRange' => '-20',
//'yearRange' => 'c-25:c+0',
'clientOptions' =>[
'dateFormat' => 'd-m-yy',
'language' => 'US',
'country' => 'IN',
'showAnim'=>'fold',
'yearRange' => 'c-25:c+0',
'changeMonth'=> true,
'changeYear'=> true,
'autoSize'=>true,
'showOn'=> "button",
//'buttonImage'=> "images/calendar.gif",
'htmlOptions'=>[
'style'=>'width:80px;',
'font-weight'=>'x-small',
],]]) ?>
Thanks.