Custom Date Formatting with Spring Data Binding


protected void initBinder(HttpServletRequest request, ServletRequestDataBinder binder) throws Exception
{
super.initBinder(request, binder);
binder.registerCustomEditor(Date.class,
"estimatedCompletionDate",
new CustomDateEditor(new SimpleDateFormat( "M/d/yy"), true)
);
}

Reply

The content of this field is kept private and will not be shown publicly.
  • Lines and paragraphs break automatically.

More information about formatting options