PHPackages                             2amigos/yii2-date-picker-widget - 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. 2amigos/yii2-date-picker-widget

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

2amigos/yii2-date-picker-widget
===============================

Bootstrap DatePicker widget for Yii2.

1.0.7(8y ago)1281.0M↓15.1%77[14 issues](https://github.com/2amigos/yii2-date-picker-widget/issues)8BSD-3-ClausePHP

Since Apr 3Pushed 6y ago27 watchersCompare

[ Source](https://github.com/2amigos/yii2-date-picker-widget)[ Packagist](https://packagist.org/packages/2amigos/yii2-date-picker-widget)[ Docs](http://yiiwheels.com/extension/bootstrap-datepicker)[ RSS](/packages/2amigos-yii2-date-picker-widget/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (4)Versions (10)Used By (8)

Bootstrap DatePicker Widget for Yii2
====================================

[](#bootstrap-datepicker-widget-for-yii2)

[![Latest Version](https://camo.githubusercontent.com/a0964fd1eed5b88118ffee9ddcb1966ef15af2ff20aa4aba9abcf8a474921b62/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7461672f32616d69676f732f796969322d646174652d7069636b65722d7769646765742e7376673f7374796c653d666c61742d737175617265266c6162656c3d72656c65617365)](https://github.com/2amigos/yii2-date-picker-widget/tags)[![Software License](https://camo.githubusercontent.com/b60331a2084501dc07cf6d6964c0da58dd005d89c45cf3b28b4b22b60f5ec00f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4253442d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/2c881f477ee2c78a1f861bdb7938c784eb1322699cc3ed576d477406999a6a96/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f32616d69676f732f796969322d646174652d7069636b65722d7769646765742f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/2amigos/yii2-date-picker-widget)[![Coverage Status](https://camo.githubusercontent.com/c69d953f6d61525b908e9ad1d285dff167b2426ad62e30b6e027193145479bde/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f32616d69676f732f796969322d646174652d7069636b65722d7769646765742e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/2amigos/yii2-date-picker-widget/code-structure)[![Quality Score](https://camo.githubusercontent.com/a32ab9b44ca4eeb0ec491e76c12969608ead11a1c3d8b01415c2daa268329a59/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f32616d69676f732f796969322d646174652d7069636b65722d7769646765742e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/2amigos/yii2-date-picker-widget)[![Total Downloads](https://camo.githubusercontent.com/838692ad007ce8fe0bce96dc801e4afe56b8f46b7775773046733adda1e1887b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f32616d69676f732f796969322d646174652d7069636b65722d7769646765742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/2amigos/yii2-date-picker-widget)

Renders a [Bootstrap DatePicker plugin](http://bootstrapformhelpers.com/datepicker/).

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

[](#installation)

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

Either run

```
$ composer require 2amigos/yii2-date-picker-widget:~1.0
```

or add

```
"2amigos/yii2-date-picker-widget" : "~1.0"
```

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

Usage
-----

[](#usage)

The widget comes in two flavors:

- DatePicker
- DateRangePicker

**DatePicker**

This widget renders a Bootstrap DatePicker input control. Best suitable for model with date string attribute.

***Example of use with a form***
There are two ways of using it, with an `ActiveForm` instance or as a widget setting up its `model` and `attribute`.

```
