mr4-lc/select-birthday
最新稳定版本:0.0.2
Composer 安装命令:
composer require mr4-lc/select-birthday
包简介
Laravel form control select birthday
README 文档
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).
统计信息
- 总下载量: 33
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-09-11