Angularjs datetime

JavaScript
var myDate = new Date();
myDate = $filter('date')(myDate , "YYYY-MM-DDThh:mm"); 
$scope.form.date.push(myDate);
Source

Also in JavaScript: