datetimepicker - datepicker yii2 kartik wrong format -


i have problem kartik datetime picker.

the value has entered gets scrambled in input, following screenshot tells all:

screenshot scrambled input

i followed demo code:

 <?php    use kartik\datetime\datetimepicker;    echo '<label>start date/time</label>';     echo datetimepicker::widget([         'name' => 'startdatetime',         'options' => ['placeholder' => 'select operating time ...'],         'convertformat' => true,         'pluginoptions' => [             'format' => 'd-m-y g:i a',             'startdate' => '01-mar-2014 12:00 am',             'todayhighlight' => true          ]            ]);          ?> 

you using php's data formatting characters. see plugin documentaion correct date formatting. in case instead of d-m-y g:i a should dd-m-yyyy h:ii p


Comments