Download the PHP package malzariey/filament-daterangepicker-filter without Composer
On this page you can find all versions of the php package malzariey/filament-daterangepicker-filter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download malzariey/filament-daterangepicker-filter
More information about malzariey/filament-daterangepicker-filter
Files in malzariey/filament-daterangepicker-filter
Package filament-daterangepicker-filter
Short Description This package uses daterangepciker library to filter date by a range or predefined date ranges (Today , Yesterday ...etc)
License MIT
Homepage https://github.com/malzariey/filament-daterangepicker-filter
Informations about the package filament-daterangepicker-filter
Filament Date Range Picker and Filter
This package that adds a date range picker and filter to the Filament panel using the daterangepicker
library. It provides options to filter dates by a specific range or predefined ranges such as "Today", "Yesterday", etc.
Installation
You can install the package via composer:
You can publish the translation files with:
Optionally, you can publish the views using
Usage
As a Field
As a Filter
Options
Timezone
Set the picker timezone, defaults to the project timezone. Example setting timezone to 'UTC'.
Start and End Dates
You can specify initial selected Start and End Dates for the filter. The following example will initialize the filter to today's date. `
Default
You could also use a shortcut for above using the following
`
Min and Max Dates
Specify the minimum and maximum dates for the calendar. The following example will only enable selecting previous month to next month.
`
First Day of Week
Set Monday as the first day of the week on the calendar of your DateRangeFilter.
`
Always Show Calendar
Normally, if you use the ranges option to specify pre-defined date ranges, calendars for choosing a custom date range are not shown until the user clicks "Custom Range". When this option is set to true, the calendars for choosing a custom date range.
Time Picker
Adds select boxes to choose times in addition to dates.
Show Time Picker Seconds
Show seconds in the timePicker.
Time Picker 24-Hour Format
Use 24-hour instead of 12-hour times, removing the AM/PM selection
Time Picker Increment Option
Increment of the minutes selection list for times (i.e. 30 to allow only selection of times ending in 0 or 30).
Auto Apply
Hide the apply and cancel buttons, and automatically apply a new date range as soon as two dates are clicked.
Note: Does not work with timePicker
option.
Linked Calendars
When enabled, the two calendars displayed will always be for two sequential months (i.e. January and February), and both will be advanced when clicking the left or right arrows above the calendars. When disabled, the two calendars can be individually advanced and display any month/year
Single Calendar
Show only a single calendar to choose one date, instead of a range picker with two calendars. Used Only with DateRangePicker
.
Disabled Dates
Indicate whether that date should be available for selection or not.
Display and Picker Formats
Specify the format for the display and selection of dates.
Customize Query
Apply a custom filter query.
Filter Indicator
Show an indicator when the filter is active.
Predefined Ranges
Customize the predefine date ranges for quick selection.
Use Range Labels
By using the useRangeLabels
function, it enables the field to display the predefined range labels instead of actual date ranges. This can simplify the display and make it more user-friendly.
Disabling Custom Range Selection
If you want the users to only choose from the predefined ranges and prevent them from selecting custom ranges, you can use the disableCustomRange option.
Separator
Specify the separator for the date range.
Drops Position
Specify the location the filter menu should drop at.
Options
DropDirection::DOWN
: The picker will appear below field. (Default)
DropDirection::AUTO
: Auto decide the location.
DropDirection::UP
: The picker will appear above field.
Example
Open Position
Specify the location the filter menu should open to.
Options
OpenDirection::LEFT
: The picker will appear left to the field. (Default)
OpenDirection::RIGHT
: The picker will appear right to the field.
OpenDirection::CENTER
: The picker will appear center of the field.
Example
Clearing the Date Range Picker
If you have selected a date range and want to remove it, simply click on the calendar icon within the field.
To disable this behavior, you can use the disableClear()
method. This will prevent the user from clearing the selected date range.
To customize the icon, you can use the icon()
method. It accepts a string or Closure.
Disabling Predefined Ranges
If you wish to disable the predefined ranges feature and provide users with a custom selection only, you may use the disableRanges()
method. This will remove any preset date ranges from the picker.
Max Span
The maximum span between the selected start and end dates.
`
Display week numbers
Show localized or ISO week numbers at the start of each week on the calendars.
Display month and year dropdowns
Show month and year select boxes above calendars to jump to a specific month and year. You can also customize, minimum and maximum year shown in the dropdowns.
Screenshots
Light mode
Dark mode
Styling
If you're building a custom Filament theme, you need one more step to make the calendar theme match your custom theme.
Add this line to your resources/css/{panel_name}/theme.css
file.
Credits
License
The MIT License (MIT). Please see License File for more information.
Acknowledgements
- This project makes use of the fantastic Date Range Picker for Bootstrap by Dan Grossman.
- Special thanks to JetBrains, whose support to open-source projects has been tremendously valuable for our project's progress and improvement. Through their Open Source Support Program, JetBrains has generously provided us with free licenses to their high-quality professional developer tools, including IntelliJ IDEA and PhpStorm. These tools have greatly improved our productivity and made it easier to maintain high quality code. JetBrains has demonstrated a strong commitment to assisting the open source community, making a significant contribution to promoting open-source software and collaboration. We wholeheartedly thank JetBrains for their support and for having us in their open-source project support program.
All versions of filament-daterangepicker-filter with dependencies
spatie/laravel-package-tools Version ^1.16.4
illuminate/contracts Version ^8.0|^9.0|^10.0|^11.0