Last active
May 22, 2020 13:48
-
-
Save bscheshirwork/36a3aec9a4d66106e6cd4a65eaf6c5ab to your computer and use it in GitHub Desktop.
yii2 DI and 2lvl config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
->widget(DatePicker::class, [ | |
// 'pluginOptions' => [ | |
// 'autoclose' => true, | |
// 'format' => 'dd.mm.yyyy', | |
// 'todayHighlight' => true, | |
// ], | |
'removeButton' => false, | |
]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'container' => [ | |
'definitions' => [ | |
\kartik\date\DatePicker::class => [ | |
'pluginOptions' => [ | |
'autoclose' => true, | |
'format' => 'dd.mm.yyyy', | |
'todayHighlight' => true, | |
'assumeNearbyYear' => true, | |
], | |
'removeButton' => false, | |
], | |
\kartik\date\DatePicker::class . '0d' => [ | |
'__class' => \kartik\date\DatePicker::class, //also can use 'class' => \kartik\date\DatePicker::class | |
'pluginOptions' => [ | |
'autoclose' => true, | |
'format' => 'dd.mm.yyyy', | |
'todayHighlight' => true, | |
'endDate' => '0d', | |
'assumeNearbyYear' => true, | |
], | |
'removeButton' => false, | |
], | |
], | |
], | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
->widget(DatePicker::class, [ | |
'__class' => \kartik\date\DatePicker::class . '0d', // only '__class' not 'class' | |
// 'pluginOptions' => [ | |
// 'autoclose' => true, | |
// 'format' => 'dd.mm.yyyy', | |
// 'todayHighlight' => true, | |
// 'endDate' => '0d', | |
// ], | |
'removeButton' => false, | |
]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How to use 4 digit of date in \kartik\date\DatePicker
Becouse DI do not correct merge 2st level of config