I had to update the dependencies of a rather old project. After update and test everything, we shipped the war-file to our customer, which found some very strange behaviour.
The Calendar from
https://www.primefaces.org/showcase/ui/ ... ndar.xhtml
now has sometimes problems, if mindate or maxdate are set as string. It fails for some dates.
Normally I set mindate and maxdate by the bean.
For example this date works:
Code: Select all
<p:calendar id="cal" mode="inline"
value="#{data.selectedDate}"
pattern="dd.MM.yyyy" locale="de"
mindate="03.06.2021"
maxdate="09.06.2021">
<p:ajax event="dateSelect" listener="#{controller.dateSelectListener}" update="controlButtons"/>
</p:calendar>
Code: Select all
<p:calendar id="cal" mode="inline"
value="#{data.selectedDate}"
pattern="dd.MM.yyyy" locale="de"
mindate="27.05.2021"
maxdate="10.06.2021">
<p:ajax event="dateSelect" listener="#{controller.dateSelectListener}" update="controlButtons"/>
</p:calendar>
After updating to Primefaces 10, with MyFaces 2.3.9 running on Tomcat 9.4.41 the above problem appears. Since my problem is very urgent, I had to find a solution.
If I use java.util.Date instead of String everything works for all dates again.
I also found some related strange things in the showcase:
https://www.primefaces.org/showcase/ui/ ... ndar.xhtml
Code: Select all
<p:outputLabel for="restricted" value="Restricted:"/>
<p:calendar id="restricted" value="#{calendarView.date6}" mindate="4/1/14" maxdate="7/1/14"/>