nsept / yii2-birthday-picker
A Yii2 widget extension that allows you to easily create birthday form field
Installs: 9 406
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 3
Open Issues: 0
Language:JavaScript
Type:yii2-extension
Requires
- yiisoft/yii2: *
This package is not auto-updated.
Last update: 2024-12-21 20:03:24 UTC
README
A Yii2 widget extension that allows you to easily create birthday form field.
Installation
The preferred way to install this extension is through composer.
Either run
composer require --prefer-dist nsept/yii2-birthday-picker "*"
or add
"nsept/yii2-birthday-picker": "*"
to the require section of your composer.json
file.
Usage
Once the extension is installed, simply use it in your code by:
// model public function rules() { return [ ['birthday', 'required'], ['birthday', \nsept\birthdaypicker\BirthdayValidator::className()], ]; } // view <?= \nsept\birthdaypicker\BirthdayPickerWidget::widget([ 'form' => $form, 'model' => $model, 'attribute' => 'birthday' ]) ?>