angularjs format date for api code example
Example: Angularjs datetime
var myDate = new Date();
myDate = $filter('date')(myDate , "YYYY-MM-DDThh:mm");
$scope.form.date.push(myDate);
var myDate = new Date();
myDate = $filter('date')(myDate , "YYYY-MM-DDThh:mm");
$scope.form.date.push(myDate);