PHPackages                             buibr/yii2-datepicker-bs4 - 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. buibr/yii2-datepicker-bs4

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

buibr/yii2-datepicker-bs4
=========================

Bootstrap 4 date/time picker widget for Yii2

v1.2(3y ago)09.0kBSD-3-ClausePHPPHP &gt;=7.4

Since May 14Pushed 3y ago1 watchersCompare

[ Source](https://github.com/buibr/yii2-datepicker-bs4)[ Packagist](https://packagist.org/packages/buibr/yii2-datepicker-bs4)[ Docs](https://github.com/RomeroMsk/yii2-datepicker)[ RSS](/packages/buibr-yii2-datepicker-bs4/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

Bootstrap 4 date/time picker widget for Yii2
============================================

[](#bootstrap-4-datetime-picker-widget-for-yii2)

Credits
-------

[](#credits)

Jonathan Peterson (@Eonasdan) for [Bootstrap 4 Date/Time Picker](https://github.com/Eonasdan/bootstrap-datetimepicker).

Antonio Ramirez (@tonydspaniard) for inspiration by [Bootstrap DatePicker Widget for Yii2](https://github.com/2amigos/yii2-date-picker-widget) and code examples.

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

[](#installation)

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

```
composer require buibr/yii2-datepicker-bs4
```

Usage
-----

[](#usage)

Please refer to the [Datepicker documentation](http://eonasdan.github.io/bootstrap-datetimepicker/) web page for options and examples of using Eonasdan's Datepicker widget.

To use widget as date/time picker, set appropriate format, e.g. 'L LT' (as in examples below). See [momentjs' docs](http://momentjs.com/docs/#/displaying/format/) for valid formats.

**With a model**

```
use buibr\datepicker\DatePicker;

print DatePicker::widget([
    'model' => $model,
    'attribute' => 'attrName',
    'language' => 'ru',
    'size' => 'lg',
    'readonly' => true,
    'placeholder' => 'Choose date',
    'clientOptions' => [
        'format' => 'L',
        'minDate' => '2015-08-10',
        'maxDate' => '2015-09-10',
    ],
    'clientEvents' => [
        'dp.show' => new \yii\web\JsExpression("function () { console.log('It works!'); }"),
    ],
])
```

```
$config = [
    'addon' => false,
    'size' => 'sm',
    'clientOptions' => [
        'format' => 'L LT',
        'stepping' => 30,
    ],
];

print $form->field($model, 'attrName')->widget(DatePicker::className(), $config);
```

**Without a model**

```
use buibr\datepicker\DatePicker;

print DatePicker::widget([
    'name' => 'datepickerTest',
    'value' => '09/13/2015',
    'clientOptions' => [
        'format' => 'L',
    ],
    'dropdownItems' => [
        ['label' => 'Yesterday', 'url' => '#', 'value' => \Yii::$app->formatter->asDate('-1 day')],
        ['label' => 'Tomorrow', 'url' => '#', 'value' => \Yii::$app->formatter->asDate('+1 day')],
        ['label' => 'Some value', 'url' => '#', 'value' => 'Special value'],
    ],
])
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

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

Unknown

Total

1

Last Release

1459d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3f010dfc3a6587d208aa1d9c7bec81d58f21fbf9100b1fce35b5ae05b747d5e5?d=identicon)[buibr](/maintainers/buibr)

---

Tags

yii2extensionwidgetdatepickerDateTimePickerbootstra4p

### Embed Badge

![Health badge](/badges/buibr-yii2-datepicker-bs4/health.svg)

```
[![Health](https://phpackages.com/badges/buibr-yii2-datepicker-bs4/health.svg)](https://phpackages.com/packages/buibr-yii2-datepicker-bs4)
```

###  Alternatives

[zhuravljov/yii2-datetime-widgets

Datetime widgets for Yii2.

21118.6k3](/packages/zhuravljov-yii2-datetime-widgets)

PHPackages © 2026

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