adeattwood / yii2-ui-date-time-picker
Yii 2 Date time picker using jquery ui and the time picker addon
Installs: 48
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- php: >=5.4.0
- bower-asset/jqueryui-timepicker-addon: ^1.6
- yiisoft/yii2: ~2.0.5
- yiisoft/yii2-bootstrap: ~2.0.0
This package is auto-updated.
Last update: 2024-12-12 08:51:44 UTC
README
Yii 2 Date time picker using jquery ui and the time picker add on
This widget uses timepicker addon for jQuery UI Datepicker
Installation
composer require adeattwood/yii2-ui-date-time-picker
Usage
Basic usage
use adeattwood\yii2\datetimepicker\UiDateTimePicker; <?= UiDateTimePicker::widget([ 'name' => 'date-picker', ]) ?>
Use with active form
use adeattwood\yii2\datetimepicker\UiDateTimePicker; <?= $form->field($model, 'date-time')->widget( UiDateTimePicker::classname() ); ?>
Adding options to the date time picker
Options can be found in the time addon documentation
use adeattwood\yii2\datetimepicker\UiDateTimePicker; <?= $form->field($model, 'date-time')->widget( UiDateTimePicker::classname() [ 'datePickerOptions' => [ 'controlType' => 'select', 'oneLine' => true, 'timeFormat' => 'hh:mm tt' ] ] ); ?>