I am using materialized datepicker in my form and want to store that in my bean class property(java.util.date), but its showing null.
$('.datepicker').pickadate
({
//format: 'mm/dd/yyyy',
selectMonths: true, // Creates a dropdown to control month
selectYears: 15, // Creates a dropdown of 15 years to control year
// closeOnSelect: true
format : 'yyyy-mm-dd',
hiddenName: true
});
<input type="date" id="dob" class='datepicker' ng-model="test.dateOfBirth" /> <label
for="dob">Date of Birth </label>
here goes my Rest class:
@POST
@Path("/create")
@Consumes({ MediaType.APPLICATION_JSON})
@Produces({ "application/json" })
public String create(EmployeeBean emp) {
System.out.println("in rest method...");
System.out.println(emp.getSignum());
System.out.println(emp.getDateOfBirth());
System.out.println("Returned here");
return "{}";
}
I am getting other values but in date its showing null.