Search code examples
primefacestimereal-timetaglib

Display current Time (now) in real time inside outputtext


Is there a ready UI component which displays,in outputtext, the current time/date .

Really, i search on this feature, and i don't found anything.

We search :

and

Unfortunately, Nothing !

We want something like this

<p:outputtext>
   <p:timer date="now" format="hh:MM:ss" realtime="true" />  
</p:outputtext>

Solution

  • There is component called clock in primefaces, it will display current time in either Client or server mode.

    <p:clock/>
    <p:clock pattern="HH:mm:ss dd.MM.yyyy" />
    

    autoSync parameter will syncs time periodically.