2017 © Pedro Peláez
 

yii2-extension yii2-widget-select-year

Widget for Yii2, created selectbox field with years

image

et-soft/yii2-widget-select-year

Widget for Yii2, created selectbox field with years

  • Tuesday, August 18, 2015
  • by et-soft
  • Repository
  • 2 Watchers
  • 1 Stars
  • 2,671 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 10 % Grown

The README.md

yii2-widget-select-year

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

Widget for Yii2, created selectbox field with years., (*2)

Install

Either run, (*3)

$ php composer.phar require et-soft/yii2-widget-select-year "*"

or add, (*4)

"et-soft/yii2-widget-select-year": "*"

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

Examples

Show selectbox with values from 2015 (current year) to 1995 year (-20 years from current year):, (*6)

<?php echo $form->field($model, 'year')->widget(etsoft\widgets\YearSelectbox::classname(), [
    'yearStart' => 0,
    'yearEnd' => -20,
 ]);
?>

Show selectbox with values from 2005 (current year - 10 years) to 2025 year (+ 10 years from current year):, (*7)

<?php echo $form->field($model, 'year')->widget(etsoft\widgets\YearSelectbox::classname(), [
    'yearStart' => -10,
    'yearEnd' => 10,
 ]);
?>

Show selectbox with fix values from 2000 to 2010 year:, (*8)

<?php echo $form->field($model, 'year')->widget(etsoft\widgets\YearSelectbox::classname(), [
    'yearStart' => 2000,
    'yearStartType' => 'fix',
    'yearEnd' => 2010,
    'yearEndType' => 'fix',
 ]);
?>

Show selectbox with values from 2000 to current year:, (*9)

<?php echo $form->field($model, 'year')->widget(etsoft\widgets\YearSelectbox::classname(), [
    'yearStart' => 2000,
    'yearStartType' => 'fix',
    'yearEnd' => 0,
 ]);
?>

The Versions

18/08 2015

dev-master

9999999-dev https://github.com/et-soft/yii2-widget-select-year

Widget for Yii2, created selectbox field with years

  Sources   Download

BSD 3-Clause

by Evgeny Titov

extension yii2 form widget

02/08 2015

1.0.0

1.0.0.0 https://github.com/et-soft/yii2-widget-select-year

Widget for Yii2, created selectbox field with years

  Sources   Download

BSD 3-Clause

by Evgeny Titov

extension yii2 form widget