Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'datecontrol' => [
- 'class' => 'kartik\datecontrol\Module',
- // format settings for displaying each date attribute (ICU format example)
- 'displaySettings' => [
- Module::FORMAT_DATE => 'php:d/m/Y',
- Module::FORMAT_TIME => 'H:i:s',
- Module::FORMAT_DATETIME => 'php: d/m/Y H:i:s'
- ],
- // format settings for saving each date attribute (PHP format example)
- 'saveSettings' => [
- Module::FORMAT_DATE => 'php:Y-m-d', // 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' => 'America/Sao_Paulo',
- // set your timezone for date saved to db
- 'saveTimezone' => 'UTC',
- // automatically use kartik\widgets for each of the above formats
- 'autoWidget' => false,
- 'ajaxConversion' => true,
- 'widgetSettings' => [
- Module::FORMAT_DATE => [
- 'class' => 'yii\widgets\MaskedInput', // example
- 'options' => [
- 'clientOptions' => [
- 'alias' => 'dd/mm/yyyy'
- ],
- 'options' => [
- 'class' => 'form-control'
- ]
- ]
- ]
- ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement