Skip to content
This repository has been archived by the owner. It is now read-only.
A Laravel Nova date filter.
Branch: master
Clone or download
Latest commit cc78c1f Nov 30, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
dist/js add date-filter class to datePicker ref parent. closes #11 Nov 26, 2018
resources add date-filter class to datePicker ref parent. closes #11 Nov 26, 2018
src extend base `CustomFilter` class Oct 18, 2018
.gitignore initial commit Sep 19, 2018
README.md Update README.md Nov 30, 2018
composer.json initial commit Sep 19, 2018
mix-manifest.json new build Oct 16, 2018
package.json new build Oct 16, 2018
webpack.mix.js new build Oct 16, 2018
yarn.lock new build Oct 16, 2018

README.md

DEPRECATED

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
    ];
  }
}
You can’t perform that action at this time.