dev-master
9999999-dev https://github.com/mitalcoi/yii2-datetime-widgetsDatetime widgets for Yii2.
BSD-3-Clause
The Requires
by Sorokin Victor
extension yii widget datepicker datetimepicker daterangepicker
Wallogit.com
2017 © Pedro Peláez
Datetime widgets for Yii2.
The preferred way to install this extension is through composer., (*1)
Add, (*2)
"mitalcoi/yii2-datetime-widgets" : "dev-master"
to the require section of your application's composer.json file., (*3)
Demo from the bootstrap-datepicker plugin website., (*4)
use mitalcoi\widgets\DatePicker;
<?= $form->field($model, 'attribute')->widget(DatePicker::className(), [
'options' => ['class' => 'form-control'],
'clientOptions' => [
'format' => 'dd.mm.yyyy',
'language' => 'ru',
'autoclose' => true,
'todayHighlight' => true,
],
]) ?>
For more details, please check the bootstrap-datepicker plugin website., (*5)
Demo from the bootstrap-datetimepicker plugin website., (*6)
use mitalcoi\widgets\DateTimePicker;
<?= $form->field($model, 'attribute')->widget(DateTimePicker::className(), [
'options' => ['class' => 'form-control'],
'clientOptions' => [
'format' => 'dd.mm.yyyy hh:ii',
'language' => 'ru',
'autoclose' => true,
],
]) ?>
For more details, please check the bootstrap-datetimepicker plugin website., (*7)
Demo from the bootstrap-daterangepicker plugin website., (*8)
use mitalcoi\widgets\DateRangePicker;
<?= $form->field($model, 'actual_time')->widget(DateRangePicker::className(), [
'options' => ['class' => 'form-control'],
'clientOptions' => [
'ranges' => [
'Today' => [
new JsExpression('moment()'),
new JsExpression('moment()'),
],
'Yesterday' => [
new JsExpression('moment().subtract("days", 1)'),
new JsExpression('moment().subtract("days", 1)'),
],
],
'format' => 'DD.MM.YYYY',
'separator' => ' - ',
],
]) ?>
For more details, please check the bootstrap-daterangepicker plugin repo., (*9)
Datetime widgets for Yii2.
BSD-3-Clause
extension yii widget datepicker datetimepicker daterangepicker