Using angularJS with Spring- for User object DOB field, using input type date on my view file which is bind with attribute "user.dateOfBirth".
Whenever i select any date it is perfectly fine on view itself , no issue.
{{user.dateOfBirth}}
As soon as i submit and date setter of my pojo User object is invoked, the value coming is a day behind.
For ex- On AngularJS Ui, displayed value is- Oct 11, 2019 12:00:00 AM which is as per selected date but on User model- Date setter
public void setDateOfBirth(String dateOfBirth) {
//Value is coming as 2019-10-10T18:30:00.000Z
//which is a day behind the selected value
this.dateOfBirth = dateOfBirth;
}