I have an application in which there are several date fields that need to accept values from the user as well as from the database.
I found this solution but still get the error message
Error: [ngModel:datefmt]
http://errors.angularjs.org/1.5.8/ngModel/datefmt?p0=2017-05-03
My code is (you can see a number of attempts I made in comments as well):
var xx = $filter("date")(Date.now(), 'yyyy-MM-dd');
var yy = $filter("date")(Date.now(), 'yyyy-MM-dd');
$rootScope.Global.Time_Window_From = xx; // $filter("date")(Date.now(), 'yyyy-MM-dd'); //'2017-05-02' ; //Date.now() ; //$filter("date")(Date.now(), 'yyyy-MM-dd') ;
$rootScope.Global.Time_Window_To = yy; // $filter("date")(Date.now(), 'yyyy-MM-dd'); //'2017-05-02' ; //Date.now() ; //$filter("date")(Date.now(), 'yyyy-MM-dd') ;
In addition, what would be the best way to exchange DATE data with an SQL-Server database?