PHPackages                             semako/yii2-date-time-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. semako/yii2-date-time-picker-widget

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

semako/yii2-date-time-picker-widget
===================================

Bootstrap DateTimePicker widget for Yii2.

1.0.5(9y ago)053BSD-3-ClausePHP

Since Apr 3Pushed 9y ago1 watchersCompare

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

READMEChangelogDependencies (5)Versions (9)Used By (0)

Bootstrap DateTimePicker Widget for Yii2
========================================

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

[![Latest Version](https://camo.githubusercontent.com/1cc3d9290b91875241b893ee32ed4a6196824f49afd44e71976fe858c5ebd2b9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7461672f32616d69676f732f796969322d646174652d74696d652d7069636b65722d7769646765742e7376673f7374796c653d666c61742d737175617265266c6162656c3d72656c65617365)](https://github.com/2amigos/yii2-date-time-picker-widget/tags)[![Software License](https://camo.githubusercontent.com/b60331a2084501dc07cf6d6964c0da58dd005d89c45cf3b28b4b22b60f5ec00f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4253442d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/fa8b7b994c3f4fa05d4ab3829d9931ebecffa538ab26b128d9c1b16642bd54b6/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f32616d69676f732f796969322d646174652d74696d652d7069636b65722d7769646765742f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/2amigos/yii2-date-time-picker-widget)[![Coverage Status](https://camo.githubusercontent.com/3ca3b0d883ef0580a042b2334fa13ffa4dca08f7ca45a8acf613530c1e735b80/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f32616d69676f732f796969322d646174652d74696d652d7069636b65722d7769646765742e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/2amigos/yii2-date-time-picker-widget/code-structure)[![Quality Score](https://camo.githubusercontent.com/5540dcf949cce30be6876ef2c4e0aa337f70f1bdaa4a99c72748ec43bc74fd42/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f32616d69676f732f796969322d646174652d74696d652d7069636b65722d7769646765742e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/2amigos/yii2-date-time-picker-widget)[![Total Downloads](https://camo.githubusercontent.com/38d1127a7efc78d985ce7fb1ebb2c7d6234b82f18fb0db1131a681621cb193f4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f32616d69676f732f796969322d646174652d74696d652d7069636b65722d7769646765742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/2amigos/yii2-date-time-picker-widget)

Renders a [Bootstrap DateTimePicker plugin](http://www.malot.fr/bootstrap-datetimepicker/).

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

[](#installation)

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

Either run

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

or add

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

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

Usage
-----

[](#usage)

This widget renders a Bootstrap DateTimePicker input control. Best suitable for model with date string attribute. Its functionality is similar to [Bootstrap DatePicker plugin](https://github.com/2amigos/yii2-date-picker-widget) but this widget is enhanced with Time selection.

It also allows you to restrict the views so you can use this widget as a DatePicker, TimePicker, or DateTimePicker.

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

```
