I\'m using primefaces calendar for the creation of an event. With the \"mindate\" parameter i have disabled the days before the current day. I want to do this even with the end
You can use <p:ajax>
to update the end date on select of start date. The <p:calendar>
supports the ajax event dateSelect
which is fired when a date is selected.
So, this should do:
<p:calendar value="#{bean.startDate}" mindate="#{bean.today}">
<p:ajax event="dateSelect" update="endDate" />
</p:calendar>
<p:calendar id="endDate" value="#{bean.endDate}" mindate="#{bean.startDate}" />