Enhanced Yii2 wrapper for the bootstrap datetimepicker plugin

Enhanced Yii2 wrapper for the bootstrap datetimepicker plugin


Install Demo

Enhanced Yii2 wrapper for the bootstrap datetimepicker plugin

Publication time: Thursday, June 25, 2015 (5 years ago)

Created by: Visweswaran Kartik

Category: Other

Current version: dev-master
Dec 16, 2019, 12:37:15 PM (6 months ago)

Packagist: kartik-v/yii2-widget-datetimepicker

: https://github.com/kartik-v/yii2-widget-datetimepicker

: 2030814 (Per month: 41769)

Type of: Компонент

Enhanced Yii2 wrapper for the bootstrap datetimepicker plugin

Krajee Logo

Stable Version Untable Version License Total Downloads Monthly Downloads Daily Downloads

The DateTimePicker widget is a Yii 2 wrapper for the Bootstrap DateTimePicker plugin with various enhancements. The plugin is a fork of the DateTimePicker plugin by @eternicode and adds the time functionality. The widget is similar to the DateTimePicker widget in most aspects, except that it adds the time functionality and does not support ranges. The widget is specially styled for Yii framework 2.0 and Bootstrap 3 and allows graceful degradation to a normal HTML text input, if the browser does not support JQuery. The widget supports these markups:

  • Simple Input Markup
  • Component Markup - Addon Prepended
  • Component Markup - Addon Appended
  • Inline / Embedded Markup
  • Solo Button Markup

NOTE: This extension is a sub repo split of yii2-widgets. The split has been done since 08-Nov-2014 to allow developers to install this specific widget in isolation if needed. One can also use the extension the previous way with the whole suite of yii2-widgets.


The preferred way to install this extension is through composer. Check the composer.json for this extension’s requirements and dependencies. Read this web tip /wiki on setting the minimum-stability settings for your application’s composer.json.

To install, either run

$ php composer.phar require kartik-v/yii2-widget-datetimepicker "*"

or add

"kartik-v/yii2-widget-datetimepicker": "*"

to the require section of your composer.json file.

Release Changes

NOTE: Refer the CHANGE LOG for details on changes to various releases.


You can refer detailed documentation and demos on usage of the extension.


use kartik\datetime\DateTimePicker;

echo '<label>Start Date/Time</label>';
echo DateTimePicker::widget([
    'name' => 'datetime_10',
    'options' => ['placeholder' => 'Select operating time ...'],
    'convertFormat' => true,
    'pluginOptions' => [
        'format' => 'd-M-Y g:i A',
        'startDate' => '01-Mar-2014 12:00 AM',
        'todayHighlight' => true


yii2-widget-datetimepicker is released under the BSD-3-Clause License. See the bundled LICENSE.md for details.

All Comments (0)
No Comments

dev-master — Dec 16, 2019, 12:37:15 PM (6 months ago)

v1.4.9 — May 29, 2019, 3:28:51 PM (a year ago)

v1.4.8 — Oct 9, 2018, 2:39:13 PM (a year ago)

v1.4.7 — Aug 29, 2018, 2:42:11 PM (a year ago)

v1.4.6 — Aug 25, 2018, 6:09:46 PM (a year ago)

v1.4.5 — Aug 21, 2018, 9:49:35 PM (a year ago)

v1.4.4 — Jun 8, 2017, 8:53:28 AM (3 years ago)

v1.4.3 — Jan 19, 2017, 6:04:42 PM (3 years ago)

v1.4.2 — Jan 10, 2016, 3:18:38 PM (4 years ago)

v1.4.1 — Nov 4, 2015, 9:46:05 PM (4 years ago)

v1.4.0 — Jan 25, 2015, 7:36:55 PM (5 years ago)

v1.3.0 — Jan 12, 2015, 3:28:59 PM (5 years ago)

v1.2.0 — Dec 4, 2014, 12:58:45 PM (5 years ago)

v1.1.0 — Nov 28, 2014, 10:20:18 PM (5 years ago)

v1.0.0 — Nov 8, 2014, 9:48:07 PM (5 years ago)

Стандартная установка:

Добавьте composer.json файл вашего проекта:

"kartik-v/yii2-widget-datetimepicker": "*"

Запустите обновление зависимостей

Читать про обнолвение SkeekS CMS