转自酷猫
<h:form>
<h:outputLabel value="选取时间" />
<h:panelGroup>
<rich:calendar id="selectTime" popup="true" locale="cn" value="#{myBean.selectTime}" cellWidth="30px" cellHeight="30px" datePattern="yyyy-MM-dd HH:mm" required="true" requiredMessage="必须填写开单时间" />
</ h:message for="selectTime " style="color:red" >
</h:panelGroup>
</h:form>
最后在我们的messages_cn.properties文件添加以下key,value可以实现国际化
RICH_CALENDAR_TODAY_LABEL=今天
RICH_CALENDAR_CLOSE_LABEL=关闭
RICH_CALENDAR_OK_LABEL=确定
RICH_CALENDAR_CLEAN_LABEL=清空
RICH_CALENDAR_CANCEL_LABEL=取消