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

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -