How to restrict input for a trinidad input date control?

390 Views Asked by At

I have a control on a page, and would like to restrict users entering dates directly into the textbox associated with the date picker.

Is there any way to do this.

Thanks and Regards,

Wriju

1

There are 1 best solutions below

1
On BEST ANSWER

An easy solution would be adding onkeydown="return false" to your <tr:inputDate/>. This will prevent users from typing in the date field.

<tr:inputDate chooseId="chooseDate1"
              value="#{myBean.myDate}"
              onkeydown="return false"/>
<tr:chooseDate id="chooseDate1"/>