How to prevent user input data in calendar textbox of Primefaces
jsf, primefaces
Solution
Use readOnlyInputText of calendar. Set the readOnlyInputText to true so that user cannot enter into the input area.
Problem
In my code, I use calendar of Primefaces ``` <p:calendar id="cal" value="#{accountController.selected.mydate}" styleClass="custom" pattern="dd-MMM-yyyy HH:mm" /> ``` - If I use other pattern such as: pattern="dd/MM/yyyy HH:mm", pattern="dd-MM-yyyy HH:mm", etc ==> user can not input data in calendar textbox. - But if I use pattern="dd-MMM-yyyy HH:mm" ==> user can input data in calendar textbox. So I want to ask: How can I prevent user input data inside calendar textbox if I use pattern="dd-MMM-yyyy HH:mm" ? In Primefaces has any attribute that equivalent with enableManualInput attribute of Richfaces ?. Thanks for your help