djabiev/yii2-clocktimepicker

Yii2 wrapper for clockpicker (clock-like time picker) plugin

1.0.1 2019-01-16 16:20 UTC

This package is not auto-updated.

Last update: 2025-06-14 01:29:31 UTC


README

Bootstrap Yii2 widgets for clockpicker (clock-like time picker) jquery plugin

Installation

The preferred way to install this extension is through composer.

Either run

composer require --prefer-dist "djabiev/yii2-clocktimepicker:*"

or add

"djabiev/yii2-clocktimepicker": "*"

to the require section of your composer.json file.

Usage

In the view file register the asset:

use djabiev\widgets\BootstrapClockTimePicker;


// with ActiveForm
echo $form->field($model, 'attribute')->widget(BootstrapClockTimePicker::className() [
    // extra configuration
]);

// without ActiveForm and with model.
echo BootstrapClockTimePicker::widget([
    'model' => $model,
    'attribute' => 'time_start',
]);

Documentation

The JS options can be passed using the $clientOptions property and the events can be declared using the $clientEvents property. The documentation on all the options and events supported by clockpicker can be found here.

License

The BSD License (BSD). Please see License File for more information.