PHPackages                             maddoger/yii2-datetimepicker - 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. maddoger/yii2-datetimepicker

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

maddoger/yii2-datetimepicker
============================

Yii2 DateTimePicker Widget.

v2.0.0(7y ago)1349MITPHP

Since Nov 9Pushed 7y ago1 watchersCompare

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

READMEChangelog (3)Dependencies (3)Versions (14)Used By (0)

Yii2 DateTimePicker and date format behavior
============================================

[](#yii2-datetimepicker-and-date-format-behavior)

DateTimePicker widget is a wrapper of [Bootstrap DatePicker](http://eonasdan.github.io/bootstrap-datetimepicker/) for Yii 2 framework.

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist maddoger/yii2-datetimepicker "*"

```

or add

```
"maddoger/yii2-datetimepicker": "*"

```

to the require section of your `composer.json` file.

Usage
-----

[](#usage)

Once the extension is installed, simply use it in your code by:

```
use maddoger\widgets\DateTimePicker;

echo $form->field($model, 'field')->widget(DateTimePicker::className());
```

Date Attribute
--------------

[](#date-attribute)

For datetime format and timezone conversation you can use `DateTimeBehavior`.

In model behaviors for timestamp field:

```
[
    'class' => DateTimeBehavior::className(),
    'attributes' => ['published_at'],
    'originalFormat' => 'U', //original format
    'originalTimeZone' => 'UTC', //original timezone

    'timeZone' => 'Europe/London', //local timezone
    'format' => 'datetime', //local format, Formatter format
]
```

Now you can use `published_at` as original attribute and `published_at_local` as user read-write attribute.

For date fields:

```
[
    'class' => DateTimeBehavior::className(),
    'attributes' => ['birth_date'],
    'originalFormat' => 'Y-m-d',
    'format' => 'date',
    'timeZone' => 'UTC',
]
```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity70

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 ~107 days

Recently: every ~274 days

Total

13

Last Release

2912d ago

Major Versions

v1.5.2 → v2.0.02018-05-22

### Community

Maintainers

![](https://www.gravatar.com/avatar/09bde1fb9f0bb0ef7e7b4e6d7d1e346b2c2f1b076bd757ef85722abb37a98000?d=identicon)[maddoger](/maintainers/maddoger)

---

Top Contributors

[![maddoger](https://avatars.githubusercontent.com/u/6214206?v=4)](https://github.com/maddoger "maddoger (23 commits)")

---

Tags

yii2extensionwidget

### Embed Badge

![Health badge](/badges/maddoger-yii2-datetimepicker/health.svg)

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

###  Alternatives

[richardfan1126/yii2-js-register

Yii2 widget to register JS into view

1357.2k7](/packages/richardfan1126-yii2-js-register)

PHPackages © 2026

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