Primefaces : How to disabling retroactive dates in the calendar component?

A lot of times, you don’t want to allow to user can be selected a retroactive date. Below is a solution.

You will use the “mindate” attribute.

Until date informed all days and hours will be disabled.

<p:calendar mindate="#{myController.nowDate}" value="#{calendarController.selectedDate}"/>

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s