Merge pull request #13659 from howdu/docs-table-column-date-tooltip

docs: add table column date tooltip
This commit is contained in:
Dan Harrin
2024-07-24 12:44:00 +01:00
committed by GitHub
2 changed files with 20 additions and 0 deletions
@@ -56,6 +56,16 @@ TextEntry::make('created_at')
->since()
```
Additionally, you can use the `dateTooltip()`, `dateTimeTooltip()` or `timeTooltip()` method to display a formatted date in a tooltip, often to provide extra information:
```php
use Filament\Infolists\Components\TextEntry;
TextEntry::make('created_at')
->since()
->dateTimeTooltip()
```
## Number formatting
The `numeric()` method allows you to format an entry as a number:
@@ -82,6 +82,16 @@ TextColumn::make('created_at')
->since()
```
Additionally, you can use the `dateTooltip()`, `dateTimeTooltip()` or `timeTooltip()` method to display a formatted date in a tooltip, often to provide extra information:
```php
use Filament\Tables\Columns\TextColumn;
TextColumn::make('created_at')
->since()
->dateTimeTooltip()
```
## Number formatting
The `numeric()` method allows you to format an entry as a number: