How to prevent user data from being entered into the calendar text field from Primefaces

In my code I use Primefaces calendar

<p:calendar id="cal" value="#{accountController.selected.mydate}" styleClass="custom" pattern="dd-MMM-yyyy HH:mm" />
  • If I use another template, for example: pattern = "dd / MM / yyyy HH: mm", pattern = "dd-MM-yyyy HH: mm", etc. ==> the user cannot enter data in the calendar text field.
  • But if I use pattern = "dd-MMM-yyyy HH: mm" ==>, the user can enter data in the calendar text box.

So, I want to ask: how can I prevent user input from entering the calendar text box if I use pattern = "dd-MMM-yyyy HH: mm"?

Primefaces has an attribute equivalent to the enableManualInput attribute for Richfaces ?.

thanks for the help

+3
source share
1

readOnlyInputText . readOnlyInputText true, .

+5

All Articles