64robots / nova-date-filter
A Laravel Nova date filter.
Installs: 29 656
Dependents: 0
Suggesters: 0
Security: 0
Stars: 32
Watchers: 2
Forks: 15
Open Issues: 1
Language:CSS
Requires
- php: >=7.1.0
README
Since Nova 1.1.8 this feature has been adopted to the core. You should upgrade Nova and use that filter instead.
Date Filter for Laravel Nova
Nova filter that displays a Date Picker instead of a select.
Demo
Install
Run this command in your nova project:
composer require 64robots/nova-date-filter
How to use
Just use DateFilter class instead of Filter
use R64\Filters\DateFilter; class DateFrom extends DateFilter { // }
Customization
As Date Filter is not a select anymore we can use options method to pass the date picker config
use R64\Filters\DateFilter; class DateFrom extends DateFilter { //... public function options(Request $request) { return [ 'dateFormat' => 'Y-m-d', // default Y-m-d H:i:S 'placeholder' => 'My placeholder', // default __('Pick a date') 'disabled' => true, // default false 'twelveHourTime' => true, // default false 'enableTime' => true, // default false 'enableSeconds' => true, // default false ]; } }