How to restrict input for a trinidad input date control?
-
13-06-2021 - |
سؤال
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
المحلول
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"/>
لا تنتمي إلى StackOverflow