2017 © Pedro Peláez
 

yii2-extension yii2-date-range

An advanced Yii 2 date range picker input for based on bootstrap-daterangepicker plugin.

image

jeffwalsh/yii2-date-range

An advanced Yii 2 date range picker input for based on bootstrap-daterangepicker plugin.

  • Wednesday, July 19, 2017
  • by jeffwalsh
  • Repository
  • 1 Watchers
  • 0 Stars
  • 68 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 61 Forks
  • 0 Open issues
  • 24 Versions
  • 0 % Grown

The README.md

yii2-date-range

Latest Stable Version License Total Downloads Monthly Downloads Daily Downloads, (*1)

An advanced date range picker input for Yii Framework 2 based on dangrossman/bootstrap-daterangepicker plugin. The date range picker widget is styled for Bootstrap 3.x and creates a dropdown menu from which a user can select a range of dates. If the plugin is invoked with no options, it will present two calendars to choose a start and end date from. Optionally, you can provide a list of date ranges the user can select from instead of choosing dates from the calendars. If attached to a text input, the selected dates will be inserted into the text box. Otherwise, you can provide a custom callback function to receive the selection., (*2)

Additional enhancements added for this widget (by Krajee):, (*3)

  • allows ability to work with Bootstrap input group addons and set the picker position to point at the input-group-addon icon.
  • enhanced translation features using yii i18n message files.
  • automatically convert format from PHP Date/time format to Moment.js Date/time format.
  • automatically trigger change of base field to enforce Yii ActiveField validation
  • ability to set the widget to display a preset dropdown of date options within a container (and hidden input).
  • style the container options as per your need using templates
  • automatically disable date-range based on disabled/readonly options.

Demo

You can see detailed documentation on usage of the extension., (*4)

Latest Release

The latest version of the extension is release v1.6.6. Refer the CHANGE LOG for details of various releases., (*5)

Installation

The preferred way to install this extension is through composer., (*6)

Note: 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., (*7)

Either run, (*8)

$ php composer.phar require kartik-v/yii2-date-range "dev-master"

or add, (*9)

"kartik-v/yii2-date-range": "dev-master"

to the require section of your composer.json file., (*10)

Usage

DateRangePicker

use kartik\daterange\DateRangePicker;
echo DateRangePicker::widget([
    'model'=>$model,
    'attribute'=>'datetime_range',
    'convertFormat'=>true,
    'pluginOptions'=>[
        'timePicker'=>true,
        'timePickerIncrement'=>30,
        'locale'=>[
            'format'=>'Y-m-d h:i A'
        ]
    ]
]);

or using seperate min/max attributes on model, (*11)

use kartik\daterange\DateRangePicker;
echo DateRangePicker::widget([
    'model'=>$model,
    'attribute'=>'datetime_range',
    'convertFormat'=>true,
    'startAttribute'=>'datetime_min',
    'endAttribute'=>'datetime_max',
    'pluginOptions'=>[
        'timePicker'=>true,
        'timePickerIncrement'=>30,
        'locale'=>[
            'format'=>'Y-m-d h:i A'
        ]
    ]
]);

License

yii2-date-range is released under the BSD 3-Clause License. See the bundled LICENSE.md for details., (*12)

The Versions

19/07 2017

dev-master

9999999-dev https://github.com/kartik-v/yii2-date-range

An advanced Yii 2 date range picker input for based on bootstrap-daterangepicker plugin.

  Sources   Download

BSD-3-Clause

The Requires

 

extension yii2 bootstrap date range widget time bootstrap 3 date-range

19/07 2017

v1.6.8

1.6.8.0 https://github.com/kartik-v/yii2-date-range

An advanced Yii 2 date range picker input for based on bootstrap-daterangepicker plugin.

  Sources   Download

BSD-3-Clause

The Requires

 

extension yii2 bootstrap date range widget time bootstrap 3 date-range

19/07 2017

v1.6.9

1.6.9.0 https://github.com/kartik-v/yii2-date-range

An advanced Yii 2 date range picker input for based on bootstrap-daterangepicker plugin.

  Sources   Download

BSD-3-Clause

The Requires

 

extension yii2 bootstrap date range widget time bootstrap 3 date-range

12/07 2016

v1.6.7

1.6.7.0 https://github.com/kartik-v/yii2-date-range

An advanced Yii 2 date range picker input for based on bootstrap-daterangepicker plugin.

  Sources   Download

BSD-3-Clause

The Requires

 

extension yii2 bootstrap date range widget time bootstrap 3 date-range

11/01 2016

v1.6.6

1.6.6.0 https://github.com/kartik-v/yii2-date-range

An advanced Yii 2 date range picker input for based on bootstrap-daterangepicker plugin.

  Sources   Download

BSD-3-Clause

The Requires

 

extension yii2 bootstrap date range widget time bootstrap 3 date-range

22/10 2015

v1.6.5

1.6.5.0 https://github.com/kartik-v/yii2-date-range

An advanced Yii 2 date range picker input for based on bootstrap-daterangepicker plugin.

  Sources   Download

BSD-3-Clause

The Requires

 

extension yii2 bootstrap date range widget time bootstrap 3 date-range

19/10 2015

v1.6.4

1.6.4.0 https://github.com/kartik-v/yii2-date-range

An advanced Yii 2 date range picker input for based on bootstrap-daterangepicker plugin.

  Sources   Download

BSD-3-Clause

The Requires

 

extension yii2 bootstrap date range widget time bootstrap 3 date-range

22/05 2015

v1.6.3

1.6.3.0 https://github.com/kartik-v/yii2-date-range

An advanced Yii 2 date range picker input for based on bootstrap-daterangepicker plugin.

  Sources   Download

BSD-3-Clause

The Requires

 

extension yii2 bootstrap date range widget time bootstrap 3 date-range

07/05 2015

dev-revert-35-feature/UpdatingAssets

dev-revert-35-feature/UpdatingAssets https://github.com/kartik-v/yii2-date-range

An advanced Yii 2 date range picker input for based on bootstrap-daterangepicker plugin.

  Sources   Download

BSD 3-Clause

The Requires

 

extension yii2 bootstrap date range widget time bootstrap 3 date-range

21/04 2015

v1.6.2

1.6.2.0 https://github.com/kartik-v/yii2-date-range

An advanced Yii 2 date range picker input for based on bootstrap-daterangepicker plugin.

  Sources   Download

BSD 3-Clause

The Requires

 

extension yii2 bootstrap date range widget time bootstrap 3 date-range

16/02 2015

v1.6.1

1.6.1.0 https://github.com/kartik-v/yii2-date-range

An advanced Yii 2 date range picker input for based on bootstrap-daterangepicker plugin.

  Sources   Download

BSD 3-Clause

The Requires

 

extension yii2 bootstrap date range widget time bootstrap 3 date-range

12/01 2015

v1.6.0

1.6.0.0 https://github.com/kartik-v/yii2-date-range

An advanced Yii 2 date range picker input for based on bootstrap-daterangepicker plugin.

  Sources   Download

BSD 3-Clause

The Requires

 

extension yii2 bootstrap date range widget time bootstrap 3 date-range

28/11 2014

v1.5.0.x-dev

1.5.0.9999999-dev https://github.com/kartik-v/yii2-date-range

An advanced Yii 2 date range picker input for based on bootstrap-daterangepicker plugin.

  Sources   Download

BSD 3-Clause

The Requires

 

extension yii2 bootstrap date range widget time bootstrap 3 date-range

28/11 2014

v1.5.0

1.5.0.0 https://github.com/kartik-v/yii2-date-range

An advanced Yii 2 date range picker input for based on bootstrap-daterangepicker plugin.

  Sources   Download

BSD 3-Clause

The Requires

 

extension yii2 bootstrap date range widget time bootstrap 3 date-range

25/11 2014

v1.4.0.x-dev

1.4.0.9999999-dev https://github.com/kartik-v/yii2-date-range

An advanced Yii 2 date range picker input for based on bootstrap-daterangepicker plugin.

  Sources   Download

BSD 3-Clause

The Requires

 

extension yii2 bootstrap date range widget time bootstrap 3 date-range

25/11 2014

v1.4.0

1.4.0.0 https://github.com/kartik-v/yii2-date-range

An advanced Yii 2 date range picker input for based on bootstrap-daterangepicker plugin.

  Sources   Download

BSD 3-Clause

The Requires

 

extension yii2 bootstrap date range widget time bootstrap 3 date-range

21/11 2014

v1.3.0.x-dev

1.3.0.9999999-dev https://github.com/kartik-v/yii2-date-range

An advanced Yii 2 date range picker input for based on bootstrap-daterangepicker plugin.

  Sources   Download

BSD 3-Clause

The Requires

 

extension yii2 bootstrap date range widget time bootstrap 3 date-range

21/11 2014

v1.3.0

1.3.0.0 https://github.com/kartik-v/yii2-date-range

An advanced Yii 2 date range picker input for based on bootstrap-daterangepicker plugin.

  Sources   Download

BSD 3-Clause

The Requires

 

extension yii2 bootstrap date range widget time bootstrap 3 date-range

20/11 2014

v1.2.0.x-dev

1.2.0.9999999-dev https://github.com/kartik-v/yii2-date-range

An advanced Yii 2 date range picker input for based on bootstrap-daterangepicker plugin.

  Sources   Download

BSD 3-Clause

The Requires

 

extension yii2 bootstrap date range widget time bootstrap 3 date-range

20/11 2014

v1.2.0

1.2.0.0 https://github.com/kartik-v/yii2-date-range

An advanced Yii 2 date range picker input for based on bootstrap-daterangepicker plugin.

  Sources   Download

BSD 3-Clause

The Requires

 

extension yii2 bootstrap date range widget time bootstrap 3 date-range

10/11 2014

v1.1.0.x-dev

1.1.0.9999999-dev https://github.com/kartik-v/yii2-date-range

An advanced Yii 2 date range picker input for based on bootstrap-daterangepicker plugin.

  Sources   Download

BSD 3-Clause

The Requires

 

extension yii2 bootstrap date range widget time bootstrap 3 date-range

10/11 2014

v1.1.0

1.1.0.0 https://github.com/kartik-v/yii2-date-range

An advanced Yii 2 date range picker input for based on bootstrap-daterangepicker plugin.

  Sources   Download

BSD 3-Clause

The Requires

 

extension yii2 bootstrap date range widget time bootstrap 3 date-range

24/09 2014

v1.0.0.x-dev

1.0.0.9999999-dev https://github.com/kartik-v/yii2-date-range

An advanced Yii 2 date range picker input for based on bootstrap-daterangepicker plugin.

  Sources   Download

BSD 3-Clause

The Requires

 

extension yii2 bootstrap date range widget time bootstrap 3 date-range

24/09 2014

v1.0.0

1.0.0.0 https://github.com/kartik-v/yii2-date-range

An advanced Yii 2 date range picker input for based on bootstrap-daterangepicker plugin.

  Sources   Download

BSD 3-Clause

The Requires

 

extension yii2 bootstrap date range widget time bootstrap 3 date-range