TimePicker
Konten ini belum tersedia dalam bahasa Anda.
Bootstrap time picker for Yii2 forms
Standalone and model-bound inputs, configurable display formats, and canonical form submission
Select a time with the mouse or keyboard arrow keys. This extension grew out of Kartik Visweswaran’s Krajee widget, which wrapped rendom’s TimePicker plugin, forked from jdewit’s TimePicker.

Features
Section titled “Features”Quick start
Section titled “Quick start”Installation
Section titled “Installation”Install with Composer:
composer require yii2-extensions/time-picker:^2.0Load the Bootstrap CSS that matches your application’s bsVersion. On Yii 2.0.55, you can use an installed Yii
Bootstrap asset adapter; on Yii 22, provide the Bootstrap CSS and npm jQuery assets in the application. See the
installation guide and
upgrade notes.
Basic usage
Section titled “Basic usage”Render a standalone input:
use yii\helpers\Html;use yii2\extensions\timepicker\TimePicker;
echo Html::label('Start time', 'start-time');echo TimePicker::widget( [ 'name' => 'start_time', 'value' => '11:24 AM', 'options' => ['id' => 'start-time'], 'pluginOptions' => [ 'showSeconds' => true, ], ],);Or bind the widget to a model attribute inside an existing ActiveForm:
use yii2\extensions\timepicker\TimePicker;
echo $form ->field($model, 'start_time') ->widget( TimePicker::class, [ 'pluginOptions' => [ 'showMeridian' => false, 'defaultTime' => false, ], ] );Documentation
Section titled “Documentation”Practical guides and usage examples for time inputs, Bootstrap integration and canonical form submission.
The guides and the API reference generated
from the PHPDoc in src/ are published at https://yii2-framework.github.io/docs/extensions/time-picker/.
AI assistance
Section titled “AI assistance”AI agents: read the documentation index and fetch the Markdown version
of a page by appending index.md to its URL. The
AI agents guide covers skill installation, client setup and
verification.
- 🤖
yii2-time-pickerskill: configure Bootstrap markup, icons, and plugin options; verify submitted time values and form behavior.
See the repository guides, the skill source, the source PHPDoc, and the changelog. Check the guides against the installed revision before applying examples.
Special thanks
Section titled “Special thanks”Originally developed by Kartik Visweswaran as Krajee TimePicker. Stefano Mtangoo adapted the extension for Yii2 Extensions. The upstream copyright and BSD-3-Clause terms remain in LICENSE.md.
Our social networks
Section titled “Our social networks”Follow on X Follow on Facebook Join our Subreddit Join on Telegram
License
Section titled “License”The bundled Bootstrap Timepicker JavaScript and CSS also carry Joris de Wit’s MIT notice.
Package
Section titled “Package”- Source code and issues: yii2-extensions/time-picker. Star the repository if the package is useful to you.
- Composer package: yii2-extensions/time-picker.
- Changelog: CHANGELOG.md.