New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Calendar: mindate and maxdate does not work #7576
Comments
melloware
changed the title
p:calendar mindate and maxdate does not work
Calendar: mindate and maxdate does not work
Jul 12, 2021
DatePicker shows same behaviour
results in |
wal-jan
added a commit
to wal-jan/primefaces
that referenced
this issue
Jul 26, 2021
wal-jan
added a commit
to wal-jan/primefaces
that referenced
this issue
Jul 26, 2021
wal-jan
added a commit
to wal-jan/primefaces
that referenced
this issue
Jul 27, 2021
wal-jan
added a commit
to wal-jan/primefaces
that referenced
this issue
Jul 27, 2021
wal-jan
added a commit
to wal-jan/primefaces
that referenced
this issue
Jul 27, 2021
wal-jan
added a commit
to wal-jan/primefaces
that referenced
this issue
Jul 27, 2021
melloware
pushed a commit
that referenced
this issue
Jul 27, 2021
* Fix #7576: corrected validateMinMax used in p:calendar and p:datePicker * Fix #7576: added momre tests * Fix #7576: added validateMinMax unit tests * Fix #7576: corrected validateMinMax used in p:calendar and p:datePicker * Fix #7576: corrected validateMinMax used in p:calendar and p:datePicker * Fix #7576: enhanced validateMinMax unit tests * refactored after review
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the defect
As described here
https://forum.primefaces.org/viewtopic.php?f=3&t=67214
setting mindate/maxdate in p:calender get strange results.
This one works:
<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>
For this dates, I got a error "Calendar : "cal" minimum date must be less than maximum date.":
<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>
Reproducer
Just open your showcase
https://www.primefaces.org/showcase/ui/input/calendar/calendar.xhtml
In your showcase mindate="4/1/14" and maxdate="7/1/14". It seems that p:calendar does not use these values.
Environment:
To Reproduce
See "Reproducer" for details.
Expected behavior
mindate and maxdate should work as expected for ALL dates. I can't migrate to datepicker at the moment, which was suggested by another user.
Example XHTML
See "Reproducer" for details.
Example Bean
See "Reproducer" for details.
The text was updated successfully, but these errors were encountered: