Hello guys, I have the following DatePicker (nothing unusual here):
<?=$form->field($pessoa_has_infracao, 'data')->widget(DatePicker::classname(),[
'name' => 'to_date',
'language' => 'pt-BR',
'clientOptions' => [
'dateFormat' => 'dd/MM/yyyy'
],
'options' => [
'language' => 'pt-BR',
'class' => 'round form-control',
'placeholder' => "Data"
],
])->label(false); ?>
The problem is that the format rendered is MM/dd/yyyy and the language is English. I know I might have plaaced the ‘languange’ and ‘dateFormat’ in the wrong place, but I have tried them both inside of clientOptions and options as well.
I have heard somewhere that I should place dateFormat before anything else and I also tried this approach which resulted in an error.
Can anyone help me out?