Invalid field value for field "onDutyDate"

在struts2中表单传递Date类数据时出现数据转换异常

<s:date name="onDutyDate" var="myDate" format="yyyy--MM--dd"/>
<s:textfield name="onDutyDate" readonly="true" value="%{#myDate}" onfocus="c.showMoreDay=true;c.show(this);"></s:textfield>

数据格式format="yyyy--MM--dd"有误,应为format="yyyy-MM-dd"

猜你喜欢

转载自blog.csdn.net/wang037195/article/details/82777424