سؤال

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"/>
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top