Q:Legend Primefaces Date of Previous Day

Asked

Viewed 278 times

1

Has anyone ever had a problem with p:Legend returning the date as the day before 11:00 ? You select the date and when to send it captures as of the Previous day at 23h.

Any solution? Na View:

< p:calendar id="dataInicio" pattern="dd/MM/yyyy" mask="99/99/9999" size="15" maxlength="10" navigator="true" locale="pt" value="#{gerenciaNfeBean.filter.dataInicio}" effect="show">
< f:convertDateTime pattern="dd/MM/yyyy" timeZone="America/Sao_Paulo" locale="pt_BR" />

Model:

protected Date dataInicio;

Web.XML

< context-param>
< param-name>javax.faces.DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE
< param-value > true </ param-value >
    </ context-param>
  • In the code if you use a new Date() returns correct ?

  • Returns correct. The problem is only if you try to use the component.

  • I’ll try to simulate and get back to you. Have you tried without the additional parameters? Without web.xml and the f:converter?

  • I really don’t remember, because there were so many tests I did that I don’t even know what combinations I tried.

  • I suggest you do this and see the behavior.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.