1

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

4

1 回答 1

1

一个简单的解决方案是添加onkeydown="return false"到您的<tr:inputDate/>. 这将阻止用户在日期字段中键入内容。

<tr:inputDate chooseId="chooseDate1"
              value="#{myBean.myDate}"
              onkeydown="return false"/>
<tr:chooseDate id="chooseDate1"/>
于 2012-08-25T15:07:28.510 回答