adeattwood/yii2-ui-date-time-picker

There is no license information available for the latest version (v1.1) of this package.

Yii 2 Date time picker using jquery ui and the time picker addon

v1.1 2017-01-07 23:06 UTC

This package is auto-updated.

Last update: 2024-11-12 08:37:30 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'
        ]
    ]
); ?>