Marshall
Marshall

Reputation: 1195

How to force user to pick date from p:calendar only by using mouse?

I need PrimeFaces calendar with showOn="button". And I want to force user to pick date only by using mouse from popup. So only textbox input has to be readonly (or disabled).

I have tried with readonlyInput, but it doesn't work:

<p:calendar yearRange="2001:c+20" readonlyInput="true" id="test" showOn="button"
                    pattern="dd.MM.yyyy" value="#{mybean.value}" >
</p:calendar>

EDIT: Is is even possible to do?

Upvotes: 1

Views: 2680

Answers (1)

Ananth
Ananth

Reputation: 21

Use the attribute readonly of the calendar: readonly="true"

Upvotes: 2

Related Questions