title: How to pass date to WebAPI from HTML5 input type = "date" using Angular?
body: <p>I am trying to use HTML 5 Input type = "Date" control to call a .NET web API from Angular. </p>
  
  <p>On my HTML Page I see date correctly format "dd/mm/yyyy" on the HTML Control. However when I retrieve this value in angular controller I am getting this in format "Sun Sep 11 00:00:00 GMT-0400(Eastern Daylight Time". I am confused on how to take this date and pass to Web API having date parameter in action method.</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html ng-app="myApp"&gt;
  &lt;head&gt;
      &lt;title&gt;This is to test dates being passed from Angular to WebAPI &lt;/title&gt;
      &lt;meta charset="utf-8" /&gt;
  &lt;/head&gt;
  &lt;body ng-controller="myController"&gt;
      &lt;input type="date" ng-model="HireDate" placeholder="Hire Date" /&gt; 
      &lt;br /&gt;
      &lt;input type="button" value="Get Employees" ng-click="getEmployees(HireDate)" /&gt; 
     &lt;!--&lt;div ng-repeat="empSingleRecord in employee"&gt;
         empSingleRecord.FirstName + ' ' + empSingleRecord.LastName
     &lt;/div&gt;--&gt;
  
   &lt;!--Get Angular Script Refrence--&gt; 
      &lt;script src="Scripts/angular.min.js"&gt;&lt;/script&gt;
      &lt;script src="App/AngularDateModule.js"&gt;&lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>/// </p>
  
  <pre><code>var app = angular.module('myApp', []);
  
  //Create Controller 
  app.controller("myController" , function($scope){
      // $scope.HireDate 
  
      $scope.getEmployees = function (varHireDate) {
          alert(varHireDate);
      }
  
  });
  </code></pre>