HTML
<div align="center" ng-controller="FormCtrl">
<form name="form" ng-submit="submitForm()" novalidate>
<input type="date" name="myDate" ng-model="myDate" value="myDate"/>
</form>
</div>
Javascript
var app = angular.module('formExample', []);
app.controller('FormCtrl', function ($scope, $http) {
$scope.myDate = new Date();
});
app.js
app.post('/', function (req, res) {
var jtime = req.body.myDate;
console.log(jtime);
});
Here the result (console.log) shows undefined. How to get the value of this date from angular js form.
source
share