mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 09:35:49 +02:00
Show long/verbose dateinformation in tooltip of datetime columns in tables.
This commit is contained in:
parent
6298da0572
commit
6f80129bb6
1 changed files with 12 additions and 1 deletions
|
@ -64,7 +64,18 @@ class LocaleDateTimeColumn extends AbstractColumn
|
|||
null
|
||||
);
|
||||
|
||||
return $formatter->format($value->getTimestamp());
|
||||
//For the tooltip text
|
||||
$long_formatter = IntlDateFormatter::create(
|
||||
Locale::getDefault(),
|
||||
IntlDateFormatter::FULL,
|
||||
IntlDateFormatter::LONG,
|
||||
null
|
||||
);
|
||||
|
||||
return sprintf('<span title="%s">%s</span>',
|
||||
$long_formatter->format($value->getTimestamp()), //Long form
|
||||
$formatter->format($value->getTimestamp()), //Short form
|
||||
);
|
||||
}
|
||||
|
||||
protected function configureOptions(OptionsResolver $resolver): self
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue