Hi,
I do have Joda Time on my classpath (joda-time version 1.6.2) and I don't get conversion from String to Date and the bean property is left at null, I see the binding result: no matching editors or conversion strategy found.
Registering a CustomDateEditor makes it work but it would be more flexible to leave the conversion strategy to the bean.
I don't have a setup that specifies mvc:annotation-driven. I forget why but there was a reason why that didn't work out for me. So, I'm wondering if I'm missing a crucial bean registration here
Code:
SimpleOfferVO
@DateTimeFormat(pattern="dd-MM-yyyy HH:ss")
private Date eventDateTo,eventDateFrom;
[..]
Controller
@RequestMapping(method = RequestMethod.POST, value = "/post.html")
public String post(
@ModelAttribute("vo") SimpleOfferVO vo,
BindingResult result,
ModelMap model,
HttpServletRequest request,
HttpServletResponse response) throws Exception {
[..]