- Creating Columns
- Relationships
- Available Methods
- Other Column Types
- Column Selection
- Secondary Header
- Footer
- Reusable Columns
- Anonymous Columns
- Styling
- Standard Column
- Array Columns (beta)
- Avg Columns (beta)
- Boolean Columns
- Button Group Columns
- Color Columns
- Component Columns
- Count Columns (beta)
- Date Columns
- Icon Columns (beta)
- Image Columns
- Link Columns
- Livewire Component (beta)
- Sum Columns (beta)
- View Component Columns
- Wire Link Column (beta)
- Introduction
- Boolean Filters (beta)
- Date Filters
- DateRange Filters
- DateTime Filters
- Multi-Select Dropdown Filters
- Multi-Select Filters
- NumberRange Filters
- Number Filters
- Select Filters
- Text Filters
- Livewire Custom Filter (Beta)
- Refreshing
- Loading Placeholder
- Multiple Tables Same Page
- Actions (beta)
- Adding Custom Markup
- Debugging
- Saving Table State
- Lifecycle Hooks
- Hiding The Table (beta)
- One Of Many Example
- Tools
Getting Started
Usage
DataTable
Columns
Column Types
Rows
Sorting
Pagination
Search
Bulk Actions
Filters
Filter Types
Reordering
Secondary Header
Footer
Examples
Misc.
Sponsored
Advanced Usage
Examples
🎉 Enjoying this package? Consider sponsoring me on GitHub or buying me a beer.
This is the documentation for v3. You can switch versions in the menu on the left/at the top. Check your current version with the following command:
composer show rappasoft/laravel-livewire-tables
DateTime Filters
DateTime filters are HTML datetime-local elements and act the same as date filters.
1use Rappasoft\LaravelLivewireTables\Views\Filters\DateTimeFilter;2 3public function filters(): array4{5 return [6 DateTimeFilter::make('Verified From'),7 ];8}
DateTime filters have configs to set min and max, to set the format for the Filter Pills, and to set a placeholder value
1public function filters(): array 2{ 3 return [ 4 DateTimeFilter::make('Verified From') 5 ->config([ 6 'min' => '2022-11-31 00:00:00', // Earliest Acceptable DateTime 7 'max' => '2022-12-31 05:00:00', // Latest Acceptable Date 8 'pillFormat' => 'd M Y - H:i', // Format for use in Filter Pills 9 'placeholder' => 'Enter Date Time', // A placeholder value10 ])11 ];12}
setFilterDefaultValue
DateTime filters also support the setFilterDefaultValue() method, which must be a valid datetime in the "Y-m-dTH:i" format. This will apply as a default until removed.
1public function filters(): array 2{ 3 return [ 4 DateTimeFilter::make('Verified From') 5 ->config([ 6 'min' => '2022-11-31 00:00:00', 7 'max' => '2023-12-31 05:00:00', 8 'pillFormat' => 'd M Y - H:i', 9 ])10 ->setFilterDefaultValue('2023-07-07T06:27')11 ];12}
setPillsLocale
DateTime Filters also support the setPillsLocale method, which allows you to set a locale for use in generating the Filter Pills values
1public function filters(): array 2{ 3 return [ 4 DateTimeFilter::make('Verified From') 5 ->setPillsLocale('fr ') // Use French localisation for the Filter Pills values 6 ->config([ 7 'min' => '2020-01-01', // Earliest Acceptable Date 8 'max' => '2021-12-31', // Latest Acceptable Date 9 'pillFormat' => 'd M Y - H:i', // Format for use in Filter Pills10 'placeholder' => 'Enter Date', // A placeholder value11 ])12 ];13}