i want to chang format date from default config(m/d/y) to -> format(yyyy-mm-dd) it cannot
in my config the first row it can format(yyyy-mm-dd) but row2 and later cannot in type format config
*** Input saved as: not show too.
// format settings for displaying each date attribute (ICU format example)
'displaySettings' => [
Module::FORMAT_DATE => 'yyyy-MM-dd',
Module::FORMAT_TIME => 'HH:mm:ss a',
Module::FORMAT_DATETIME => 'yyyy-MM-dd HH:mm:ss a',
],
// format settings for saving each date attribute (PHP format example)
'saveSettings' => [
Module::FORMAT_DATE => 'php:U', // saves as unix timestamp
Module::FORMAT_TIME => 'php:H:i:s',
Module::FORMAT_DATETIME => 'php:Y-m-d H:i:s',
],
// set your display timezone
'displayTimezone' => 'Asia/Bangkok',
// set your timezone for date saved to db
'saveTimezone' => 'UTC',
// automatically use kartik\widgets for each of the above formats
'autoWidget' => true,
// use ajax conversion for processing dates from display format to save format.
'ajaxConversion' => true,
// default settings for each widget from kartik\widgets used when autoWidget is true
'autoWidgetSettings' => [
Module::FORMAT_DATE => ['type'=>2, 'pluginOptions'=>['autoclose'=>true]], // example
Module::FORMAT_DATETIME => [], // setup if needed
Module::FORMAT_TIME => [], // setup if needed
],
// custom widget settings that will be used to render the date input instead of kartik\widgets,
// this will be used when autoWidget is set to false at module or widget level.
'widgetSettings' => [
Module::FORMAT_DATE => [
'class' => 'yii\jui\DatePicker', // example
'options' => [
'dateFormat' => 'php:Y-m-d',
'options' => ['class'=>'form-control'],
]
]
]
// other settings
],`
i want to chang format date from default config(m/d/y) to -> format(yyyy-mm-dd) it cannot in my config the first row it can format(yyyy-mm-dd) but row2 and later cannot in type format config *** Input saved as: not show too.
mycode
_form.php
myconfig
`'datecontrol' => [ 'class' => 'kartik\datecontrol\Module',