F
Filament7mo ago
Tieme

Table defaultGroup 'date' format datetime

Hi All, I'm grouping my records by date with
->defaultGroup('date')
->configure([
Table::$defaultDateDisplayFormat = 'l d F Y'
])
->defaultSort('date', 'desc')
->defaultGroup('date')
->configure([
Table::$defaultDateDisplayFormat = 'l d F Y'
])
->defaultSort('date', 'desc')
Is there a possability to format the date display because it shows as Date: 2023-11-25 00:00:00 and want it to be Date: Saturday 25 November 2023? For now my solution is below, but there will be added extra selects for the group that i dont want.
->defaultGroup('date')
->groups([
Tables\Grouping\Group::make('date')
->collapsible(true)
->date(true)
])
->configure([
Table::$defaultDateDisplayFormat = 'l d F Y'
])
->defaultSort('date', 'desc')
->defaultGroup('date')
->groups([
Tables\Grouping\Group::make('date')
->collapsible(true)
->date(true)
])
->configure([
Table::$defaultDateDisplayFormat = 'l d F Y'
])
->defaultSort('date', 'desc')
And als the defaultSort is not working if i apply the group, how can i sort the records with groups?
Solution:
For my case with one group i found the solution in "->groupingSettingsHidden()"
Jump to solution
1 Reply
Solution
Tieme
Tieme7mo ago
For my case with one group i found the solution in "->groupingSettingsHidden()"