Form is not giving value on controller for sql.date i am using spring and following is my code for form
<form:input path="regDateFrom" cssClass="txt-field-date" id="txt_reg_form" readonly="true" />
and my controller is as.
protected ModelAndView processFormSubmission(HttpServletRequest request,
HttpServletResponse response, Object command, BindException errors)
throws Exception {
String param_error = null;
VehicleSearch vehicleSampling = (VehicleSearch) command;
System.out.println(vehicleSampling.getRegDateFrom());
on print it gives null
You need to have
and instead of “sql.date” use “util.date”
Also try by removing property “readonly”