如何设置richfaces日历的宽度?

use*_*819 2 calendar richfaces

我正在尝试使用richfaces日历设置宽度style="width:60px",但它不起作用.

<rich:calendar  id="givenDate" name="givenDate" 
    enableManualInput="true" style="width:60px" 
    datePattern="MM/dd/yyyy"  value="#{shotController.adminDate}" 
    immediate = "true"  required="true" 
    requiredMessage="#{msg.requiredmsg}" popup="true" />
Run Code Online (Sandbox Code Playgroud)

有人可以帮忙吗?

Lui*_*oza 8

<rich:calendar>标签组件是许多部件组成,你可以设置每个人的风格.对于输入,您应该使用inputStyle属性,或者inputClass用于CSS定义的类:

<rich:calendar id="givenDate" name="givenDate"
    enableManualInput="true"
    <!-- this will be the style for the input textbox -->
    inputStyle="width:60px"
    datePattern="MM/dd/yyyy" value="#{shotController.adminDate}"
    immediate = "true" required="true"
    requiredMessage="#{msg.requiredmsg}" popup="true" />
Run Code Online (Sandbox Code Playgroud)

另一种解决方案可能是重写特定日历组件的CSS样式.完整列表可以在RichFaces组件附录A:样式类中找到.

更多信息: