【问题标题】:rich:calendar displays a date in far future when Thailand is selectedrich:calendar 选择泰国时显示遥远未来的日期
【发布时间】:2016-05-05 14:51:32
【问题描述】:

我有一个适用于 5 个国家及其当地语言的应用程序。 rich:calendar 似乎适用于所有国家/地区。除了,当我选择泰国和泰语时。 当我单击它时,我在日历中看到了一些奇怪的日期,例如 1st January 2559。对于其他语言,它工作正常。可能是什么问题。下面是我的代码。

<rich:calendar id="schoolStartDate" 
enableManualInput="true"
datePattern="#{myController.datePattern}"
styleClass="inputreqschoolday" 
showApplyButton="false"
defaultvalue="#{actionForm.progressForm.detailsForm.schoolStartDate}"
showInput="true"
value="#{myController.progressForm.detailsForm.schoolStartDate}"
locale="#{schoolManagedBean.sessionData.countryLanguage}" >
<f:validator validatorId="validateDateFormat" />
<f:converter converterId="CalDateStrConverter" />
</rich:calendar>

【问题讨论】:

  • 您检查过localeconverter 的情况吗?

标签: jsf internationalization richfaces jsf-2.2


【解决方案1】:

这似乎是rich:faces 错误。 我能够通过检查日期值null 来解决这个问题(尽管它对其他语言非常有效)。我不知道这是否是完美的解决方案。

handleNullValue function would set the value to currentdate.

我用onShow属性

onshow="handleNullValue('#{rich:clientId('schoolStartDate')}');"

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-09-30
    • 1970-01-01
    • 2017-11-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-08-20
    相关资源
    最近更新 更多