我正在使用JSF1.2和Seam,并试图在h:selectManyCheckbox中获得格式为dd/MM/yyyy的日期。selectManyCheckbox的功能本身运行良好-只是它不能正确显示日期。
<h:selectManyCheckbox id="paymentDates" value="#{entity.selectedPaymentDates}" layout="pageDirection" styleClass="radio">
<s:convertDateTime type="date" dateStyle="short" pattern="dd/MM/yyyy"/>
<s:selectItems value="#{entity.calculatedPaymentDates}" var="entity" label="#{entity}" hideNoSelection="true" />
</h:selectManyCheckbox>任何想法都非常感谢!
AJ
发布于 2012-01-06 07:24:12
日期是如何显示的?您正在将dateStyle与pattern一起使用。使用其中的一个,而不是两个都使用。“'short”将日期格式设置为:
5/14/07 12:55:42 PM
不过,我认为您必须使用style="both“来获取时间部分。
如果您想使用特定的模式,请尝试:
<s:convertDateTime type="date" pattern="dd/MM/yyyy"/>或者:
<s:convertDateTime type="both" pattern="dd/MM/yyyy"/>https://stackoverflow.com/questions/8747195
复制相似问题