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:
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.
NOTE: Refer the CHANGE LOG for details on changes to various releases.
You can refer detailed documentation and demos and API Documentation 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.
yii2-widget-datetimepicker
Date: 18-Mar-2022
Date: 28-Oct-2021
Date: 29-May-2019
Date: 09-Oct-2018
Date: 29-Aug-2018
bsVersion
.Date: 25-Aug-2018
Date: 22-Aug-2018
src
directory.Date: 08-Jun-2017
Date: 19-Jan-2017
Date: 10-Jan-2016
Date: 05-Nov-2015
ES
translations.UA
locale.layout
to control rendering of picker and remove buttons.kvdtime
.bootstrap-datetimepicker
plugin.Date: 25-Jan-2015
Date: 12-Jan-2015
Date: 04-Dec-2014
disabled
and readonly
disabled
and readonly
properties in InputWidgetDate: 29-Nov-2014
Date: 08-Nov-2014
Comments