1

How can I format a date as title of a panel in BootsFaces?

<b:panel title="#{bean.date}">
    content
</b:panel>

Actually my date is displayed like: 2016-05-14 12:00:00.0.

Can I achieve this without pre formatting the date via Java?

alexander
  • 1,191
  • 2
  • 20
  • 40

1 Answers1

2

BootsFaces doesn't have a date formatter, but there's a nice OmniFaces function you can use:

<b:panel title="#{of:formatDate(bean.date, 'dd.MM.yyyy')}">
   content
</b:panel>
Stephan Rauh
  • 3,069
  • 2
  • 18
  • 37