2017 © Pedro Peláez
 

yii2-extension yii2-field-range

Easily manage Yii 2 ActiveField ranges (from/to) with Bootstrap 3 addons markup and more

image

kartik-v/yii2-field-range

Easily manage Yii 2 ActiveField ranges (from/to) with Bootstrap 3 addons markup and more

  • Wednesday, September 6, 2017
  • by kartik-v
  • Repository
  • 3 Watchers
  • 19 Stars
  • 256,789 Installations
  • PHP
  • 42 Dependents
  • 0 Suggesters
  • 8 Forks
  • 10 Open issues
  • 11 Versions
  • 9 % Grown

The README.md

Krajee Logo
yii2-field-range
Donate

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

A Yii 2 extension that allows you to easily setup ActiveField range fields with Bootstrap 3 addons markup and more. This allows you to setup the attributes joined together like a single field with a bootstrap addon separating the two. In addition, it enables you to display the field validation error messages as one single block instead of separate validation errors for two fields., (*2)

NOTE: - The FieldRange validation routine displays only the first error encountered in validation of either of the attributes. - To understand setting up your model validation rules for the attributes when using this extension, refer this wiki, (*3)

The key features supported by this widget extension are:, (*4)

  • display the two range fields as a single grouped block using Bootstrap 3 addons
  • tweak yii active form validation to display validation errors as one single block instead of separate error blocks under each field. This allows you to style your field range inputs better for various form layouts. No more misalignment of adjacent fields due to yii validation error messages.
  • ability to use any input from yii\helpers or any widget class for rendering the from and to fields.
  • enhanced usage with \kartik\widgets\ActiveField that allows you to add custom addons to prepend and append to your inputs.
  • default support for all widgets under \kartik\widgets. Special enhanced support for \kartik\widgets\DatePicker to render date ranges.
  • ability to use the kartik\datecontrol\DateControl widget which in turn can use any Date or Time widgets.

Demo

You can see detailed documentation and demos on usage of the extension., (*5)

Release Changes

NOTE: Refer the CHANGE LOG for details on changes to various releases., (*6)

Installation

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

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

Either run, (*9)

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

or add, (*10)

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

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

Usage

FieldRange

use kartik\field\FieldRange;
use kartik\widgets\ActiveForm;
$form = ActiveForm::begin();
echo FieldRange::widget([
    'form' => $form,
    'model' => $model,
    'label' => 'Enter start and end points',
    'attribute1' => 'start_point',
    'attribute2' => 'end_point',
    'type' => FieldRange::INPUT_TEXT,
]);
ActiveForm::end();

License

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

The Versions

06/09 2017

dev-master

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

Easily manage Yii 2 ActiveField ranges (from/to) with Bootstrap 3 addons markup and more

  Sources   Download

BSD 3-Clause

The Requires

 

extension yii2 bootstrap date range widget addon to bootstrap 3 field-range from

06/09 2017

v1.3.2

1.3.2.0 https://github.com/kartik-v/yii2-field-range

Easily manage Yii 2 ActiveField ranges (from/to) with Bootstrap 3 addons markup and more

  Sources   Download

BSD 3-Clause

The Requires

 

extension yii2 bootstrap date range widget addon to bootstrap 3 field-range from

04/09 2016

v1.3.1

1.3.1.0 https://github.com/kartik-v/yii2-field-range

Easily manage Yii 2 ActiveField ranges (from/to) with Bootstrap 3 addons markup and more

  Sources   Download

BSD 3-Clause

The Requires

 

extension yii2 bootstrap date range widget addon to bootstrap 3 field-range from

25/11 2014

1.3.0.x-dev

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

Easily manage Yii 2 ActiveField ranges (from/to) with Bootstrap 3 addons markup and more

  Sources   Download

BSD 3-Clause

The Requires

 

extension yii2 bootstrap date range widget addon to bootstrap 3 field-range from

25/11 2014

v1.3.0

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

Easily manage Yii 2 ActiveField ranges (from/to) with Bootstrap 3 addons markup and more

  Sources   Download

BSD 3-Clause

The Requires

 

extension yii2 bootstrap date range widget addon to bootstrap 3 field-range from

14/11 2014

1.2.0.x-dev

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

Easily manage Yii 2 ActiveField ranges (from/to) with Bootstrap 3 addons markup and more

  Sources   Download

BSD 3-Clause

The Requires

 

extension yii2 bootstrap date range widget addon to bootstrap 3 field-range from

14/11 2014

v1.2.0

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

Easily manage Yii 2 ActiveField ranges (from/to) with Bootstrap 3 addons markup and more

  Sources   Download

BSD 3-Clause

The Requires

 

extension yii2 bootstrap date range widget addon to bootstrap 3 field-range from

05/10 2014

1.1.0.x-dev

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

Easily manage Yii 2 ActiveField ranges (from/to) with Bootstrap 3 addons markup and more

  Sources   Download

BSD 3-Clause

The Requires

 

extension yii2 bootstrap date range widget addon to bootstrap 3 field-range from

05/10 2014

v1.1.0

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

Easily manage Yii 2 ActiveField ranges (from/to) with Bootstrap 3 addons markup and more

  Sources   Download

BSD 3-Clause

The Requires

 

extension yii2 bootstrap date range widget addon to bootstrap 3 field-range from

14/07 2014

1.0.0.x-dev

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

Easily manage Yii 2 ActiveField ranges (from/to) with Bootstrap 3 addons markup and more

  Sources   Download

BSD 3-Clause

The Requires

 

extension yii2 bootstrap date range widget addon to bootstrap 3 field-range from

14/07 2014

v1.0.0

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

Easily manage Yii 2 ActiveField ranges (from/to) with Bootstrap 3 addons markup and more

  Sources   Download

BSD 3-Clause

The Requires

 

extension yii2 bootstrap date range widget addon to bootstrap 3 field-range from