Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Filament Datefilter Laravel Package

webbingbrasil/filament-datefilter

View on GitHub
Deep Wiki
Context7

Filament Date Filter

A easy-to-use date filter with range option for Laravel Filament.

Installation

Install the package via composer (requires filament >= 2.15)

composer require webbingbrasil/filament-datefilter

Usage

Date filters allow you to quickly create a filter that allows the user to select a date.

use Webbingbrasil\FilamentDateFilter\DateFilter;

DateFilter::make('created_at')
    ->label(__('Created At'))
    ->minDate(Carbon::today()->subMonth(1))
    ->maxDate(Carbon::today()->addMonth(1))
    ->timeZone('America/New_York')

Another common use case is to filter by a date range. You can do this with range() method:

use Webbingbrasil\FilamentDateFilter\DateFilter;

DateFilter::make('created_at')
    ->label(__('Created At'))
    ->minDate(Carbon::today()->subMonth(1))
    ->maxDate(Carbon::today()->addMonth(1))
    ->timeZone('America/New_York')
    ->range()
    ->fromLabel(__('From'))
    ->untilLabel(__('Until'))

If you need to use a different column name than the one you pass to the make() method, you can use the useColumn() method:

use Webbingbrasil\FilamentDateFilter\DateFilter;

DateFilter::make('created_at')
    ->useColumn('updated_at')

Global Configuration

You can set From/Until label globally using configureUsing() method in a service provider:

use Webbingbrasil\FilamentDateFilter\DateFilter;

DateFilter::configureUsing(fn ($filter) => $filter->fromLabel(__('From'))->untilLabel(__('Until')));

Credits

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
sayedenam/sayed-dashboard
milito/query-filter
apiboxsym/user-bundle
apiboxsym/health-check-bundle
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed