Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

readOnlyInput doesn't work in p:calendar primefaces

I use this :

    <p:calendar id="popupCal" yearRange="c:c+1" lang="fr" required="true"
                requiredMessage="Date obligatoire" readonlyInput="true"
                navigator="true" pattern="dd-M-yyyy" locale="fr"
                showOn="both" value="#{commandeMB.commande.dateCmd}"
                mindate="#{commandeMB.todaysDate}" />

and as I wrote, i set readonyinput to true

I tested also readonly to true and both to true but no result, always the date can be changed

is it a bug ?

thank you in advane

like image 737
begiPass Avatar asked May 09 '13 08:05

begiPass


1 Answers

If you want that user must not be able to change the value of the Calender Dates, just view it then use showOn="none" and readonly="true" in p:calender attribute, I have used it and its working (I'm using Primefaces 5.0 hope it works on all versions) :

like image 114
Shahnawaz Avatar answered Oct 26 '22 14:10

Shahnawaz