I'm working on legacy system and in DB the birthday is coming this way '1992-05-18' in json. I am using AngularJS and when applying the data binding of this variable in an input type = "date"
, of an update form, it is necessary to instantiate a Date object. Like this:
//person.byrthday = '1992-04-26'
var person.birthday = new Date (person.birthday);
// after person.byrthday = '1992-04-25T00:00:00.000Z'
How can I solve this problem through Front End in an elegant way, without "breaking" two way data binding?
I find myself in Brasil UTC -03:00