I am setting date format using the following code :
@InitBinder
public void initBinder(final WebDataBinder binder) {
binder.initDirectFieldAccess();
final SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy");
dateFormat.setLenient(false);
binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, true));
}
and sending the date in the same format from the jsp but getting error as:
Failed To Convert Property Value Of Type [Java.Lang.String] To Required Type [Java.Util.Date] For Property BidDate; Nested Exception Is Java.Lang.IllegalArgumentException: Could Not Parse Date: Unparseable Date: "05/28/2017"