PHPackages                             janisto/yii2-timepicker - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. janisto/yii2-timepicker

ArchivedYii2-extension[Utility &amp; Helpers](/categories/utility)

janisto/yii2-timepicker
=======================

Yii 2 widget for jQuery Timepicker Addon.

1.1.0(10y ago)9101.5k↑10.5%5[1 issues](https://github.com/janisto/yii2-timepicker/issues)3public domainPHPPHP &gt;=5.4.0

Since Mar 26Pushed 10y ago4 watchersCompare

[ Source](https://github.com/janisto/yii2-timepicker)[ Packagist](https://packagist.org/packages/janisto/yii2-timepicker)[ Docs](https://github.com/janisto/yii2-timepicker)[ RSS](/packages/janisto-yii2-timepicker/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (5)Versions (4)Used By (3)

Yii 2 Timepicker
================

[](#yii-2-timepicker)

Yii 2 widget for [jQuery Timepicker Addon](https://github.com/trentrichardson/jQuery-Timepicker-Addon).

[![Software License](https://camo.githubusercontent.com/7c53331e1437898fc56852830e612a6a86871bf2de861562e9f753be21f91248/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d556e6c6963656e73652d626c75652e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/1a729f5b4105afb3db90dda38480564c2fa969a93af2a42ecf0664f5c1315aef/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6a616e6973746f2f796969322d74696d657069636b65722f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/janisto/yii2-timepicker)[![Quality Score](https://camo.githubusercontent.com/a05b69a6e7230d63dde733fefa3b5064d4bac30565043d4a8ee04ac1e2be147e/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6a616e6973746f2f796969322d74696d657069636b65722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/janisto/yii2-timepicker)[![Packagist Version](https://camo.githubusercontent.com/26981013a0d40733b7793622794f7852c61db943bd86dfecae10ecbde576b777/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a616e6973746f2f796969322d74696d657069636b65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/janisto/yii2-timepicker)[![Total Downloads](https://camo.githubusercontent.com/222b81a08942a9b1a526151108c6cc508659c56eaec47190097e86318ac73891/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a616e6973746f2f796969322d74696d657069636b65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/janisto/yii2-timepicker)

Installation
------------

[](#installation)

If you do not have [Composer](http://getcomposer.org/), you may install it by following the instructions at [getcomposer.org](http://getcomposer.org/doc/00-intro.md#installation-nix).

You can then install this package using the following command:

```
php composer.phar require "janisto/yii2-timepicker" "*"
```

or add

```
"janisto/yii2-timepicker": "*"
```

to the require section of your application's `composer.json` file.

Usage
-----

[](#usage)

See [jQuery Timepicker](http://trentrichardson.com/examples/timepicker/#tp-options) options.

For example to use the timepicker with a `yii\base\Model`:

```
echo TimePicker::widget([
     //'language' => 'fi',
    'model' => $model,
    'attribute' => 'created_at',
    'mode' => 'datetime',
    'clientOptions' => [
        'dateFormat' => 'yy-mm-dd',
        'timeFormat' => 'HH:mm:ss',
        'showSecond' => true,
    ]
]);
```

```
echo TimePicker::widget([
    //'language' => 'fi',
    'model' => $model,
    'attribute' => 'created_at',
    'mode' => 'datetime',
    'inline' => true,
    'clientOptions' => [
        'onClose' => new \yii\web\JsExpression('function(dateText, inst) { console.log("onClose: " + dateText); }'),
        'onSelect' => new \yii\web\JsExpression('function(dateText, inst) { console.log("onSelect: " + dateText); }'),
    ]
]);
```

The following example will use the name property instead:

```
echo TimePicker::widget([
     //'language' => 'fi',
    'name'  => 'from_time',
    'value'  => $value,
    'mode' => 'time',
    'clientOptions' => [
        'hour' => date('H'),
        'minute' => date('i'),
        'second' => date('s'),
    ]
]);
```

You can also use this widget in an `yii\widgets\ActiveForm` using the `yii\widgets\ActiveField::widget()`method, for example like this:

```
echo $form->field($model, 'field')->widget(\janisto\timepicker\TimePicker::className(), [
    //'language' => 'fi',
    'mode' => 'datetime',
    'clientOptions' => [
        'dateFormat' => 'yy-mm-dd',
        'timeFormat' => 'HH:mm:ss',
        'showSecond' => true,
    ]
]);
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- [Jani Mikkonen](https://github.com/janisto)
- [All Contributors](../../contributors)

License
-------

[](#license)

Public domain. Please see [License File](LICENSE.md) for more information.

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity39

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~115 days

Total

3

Last Release

3840d ago

Major Versions

0.1.0 → 1.0.02015-06-26

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/387868?v=4)[Jani Mikkonen](/maintainers/janisto)[@janisto](https://github.com/janisto)

---

Top Contributors

[![janisto](https://avatars.githubusercontent.com/u/387868?v=4)](https://github.com/janisto "janisto (29 commits)")

---

Tags

datetimetimedateyii2extensionwidgettimepicker

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/janisto-yii2-timepicker/health.svg)

```
[![Health](https://phpackages.com/badges/janisto-yii2-timepicker/health.svg)](https://phpackages.com/packages/janisto-yii2-timepicker)
```

###  Alternatives

[kartik-v/yii2-date-range

An advanced Yii 2 date range picker input for based on bootstrap-daterangepicker plugin.

894.4M42](/packages/kartik-v-yii2-date-range)[kartik-v/yii2-field-range

Easily manage Yii 2 ActiveField ranges (from/to) with Bootstrap 3 addons markup and more

232.1M26](/packages/kartik-v-yii2-field-range)[sjaakp/yii2-taggable

Manage tags of ActiveRecord in Yii2.

3030.6k](/packages/sjaakp-yii2-taggable)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
