Show long/verbose dateinformation in tooltip of datetime columns in tables.

This commit is contained in:
Jan Böhmer 2022-12-11 16:48:14 +01:00
parent 6298da0572
commit 6f80129bb6

View file

@ -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