64robots/nova-date-filter

This package is abandoned and no longer maintained. No replacement package was suggested.

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

0.3.2 2018-11-26 08:36 UTC

This package is auto-updated.

Last update: 2020-01-29 05:57:17 UTC


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

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
    ];
  }
}