mr4-lc / select-birthday
Laravel form control select birthday
Installs: 31
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Language:Blade
Requires
- php: >=7.0.0
- laravelcollective/html: >=6.0
Requires (Dev)
- phpunit/phpunit: >=6.0
README
This is a form control select birthday.
Screenshot
Installation
composer require mr4-lc/select-birthday php artisan vendor:publish --tag=mr4-lc-select-birthday --force
Configuration
Usage
<script> selectAlert = function(e) { console.log(e) } </script> {{-- Form::selectBirthday($name, $value = null, $options = [], $required = false, $onchange = '') --}} {!! Form::selectBirthday('birthday0', null, [ 'default-year' => 1980, 'default-month' => 10, 'default-day' => 7, ]) !!} {!! Form::selectBirthday('birthday1', '2023-09-10') !!} {!! Form::selectBirthday( 'birthday2', '1992-09-10', [ 'max' => \Carbon\Carbon::now()->subYear(20), 'min' => \Carbon\Carbon::now()->subYear(200), ], true, 'selectAlert', ) !!} {!! Form::selectBirthday('birthday3', '1992-07-10', ['max' => '2003-09-11', 'min' => '1900-09-11']) !!} {!! Form::selectBirthday('birthday4', null, [], true) !!} {!! Form::selectBirthday('birthday5', '1992-09-10', [ 'max' => \Carbon\Carbon::now()->subYear(20), 'min' => \Carbon\Carbon::now()->subYear(200), 'class-form-group' => 'form-group mr4-lc-select-birthday', 'class-form-control-year' => 'form-control year', 'class-form-label-year' => '', 'class-form-control-month' => 'form-control month', 'class-form-label-month' => '', 'class-form-control-day' => 'form-control day', 'class-form-label-day' => '', ]) !!} {!! Form::selectBirthday('birthday6', '1992-09-10', [ 'label' => [ 'year' => '年', // Default __('admin.year') 'month' => '月', // Default __('admin.month') 'day' => '日', // Default __('admin.day') ], ]) !!}
License
Licensed under The MIT License (MIT).