Hi,
i m trying to bind date value (using calender). i am setting the field value through java script. value is set correctly, but never set in the bind model property. whereas other binded values r binded correctly.
Thanx in advance.
Shahzad
Hi,
i m trying to bind date value (using calender). i am setting the field value through java script. value is set correctly, but never set in the bind model property. whereas other binded values r binded correctly.
Thanx in advance.
Shahzad
Not sure if this is what you mean, hope it helps
Code:protected void initBinder(HttpServletRequest request, ServletRequestDataBinder binder) throws Exception { SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy HH:mm"); dateFormat.setLenient(false); binder.registerCustomEditor(Date.class,null, new CustomDateEditor(dateFormat,true)); }
Jettro Coenradie
http://www.gridshore.nl