0

I'm getting json data from api, I have a field called PURCHASEDATE with type: Date in mysql.

I made an http request and got all the data.

html:

<input type="date" ng-model="purchaseDate">

js:

//get function
$scope.purchaseDate=row.PURCHASEDATE;

I tried to alert and console log, everything is ok, I got the date : 2017-01-16

I tried to print the input value in html @{{purchaseDate}} and it's printing 2017-01-16.

the problem is that the date is not filling in the html input date. Any idea?

Elio Chamy
  • 259
  • 6
  • 21

1 Answers1

0

working fine, the solution is, when I get the data, I used :

$scope.purchaseDate= new Date(row.PURCHASEDATE);

thank you

Elio Chamy
  • 259
  • 6
  • 21