title: Unable to fetch value using angular
body: <p>I'm unable to get through a piece of code using angular js.
  Actually I'm trying to fill in a form and pass data using AngularJS. I'm able to fetch all data except the date input textfield, which is populated on the click of a button and displayed on textfield.<br/>
  Here's my code:<br/></p>
  
  <pre><code>    &lt;div ng-controller="EmployeeController"&gt;
      &lt;form name="frmEmp" novalidate&gt;
      Employee Name: 
      &lt;input type="text" class="form-control input-sm" name="EName" id="EName" ng-model="emp.EName" required /&gt;
      Salary:
      &lt;input type="number" class="form-control input-sm" name="Salary" id="Salary" ng-model="emp.Salary" required /&gt;
      Date of Birth: 
      &lt;div class="input-group"&gt;
         &lt;span class="input-group-btn"&gt;
            &lt;button class="btn btn-default btn-sm calendar-icon" type="button"&gt;&lt;span class="glyphicon glyphicon-calendar"&gt;&lt;/span&gt;&lt;/button&gt;
         &lt;/span&gt;
         &lt;input type="text" class="form-control input-sm datepickr" name="Dob" ng-model="emp.Dob" id="calendar-input" style="width: 120px;"&gt;
      &lt;/div&gt;
      &lt;input type="text" class="form-control input-sm datepickr" name="Dob" ng-model="emp.Dob" id="calendar-input" style="width: 120px;"&gt;
     &lt;input type="button" id="btnSubmit" name="btnSubmit" class="btn btn-success btn-sm" value="Looks Good" ng-click="Save(emp)" /&gt;
      &lt;/form&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>And my controller looks like below:<br/></p>
  
  <pre><code>myApp.controller('EmployeeController', ['$scope',function ($scope) {
  $scope.Save = function (emp) {
      alert("In employee\'s Save function\n" + emp);
      $scope.emp = {
          EName: emp.EName,
          Salary: emp.Salary,
          Dob: emp.Dob
      };
  
      alert("Ename: " + $scope.emp.EName);
      console.log("Ename: " + $scope.emp.EName);
  
      alert("Salary: " + $scope.emp.Salary);
      console.log("Salary: " + $scope.emp.Salary);
  
      alert("Dob: " + $scope.emp.Dob);
      console.log("Dob: " + $scope.emp.Dob);
  };
  }
  </code></pre>
  
  <p>My concern is that I'm able to fetch Ename and Salary. But Dob returns 'undefined'.<br/><br/>
  For the datepicker i'm using the following script.<br/></p>
  
  <pre><code>&lt;script type="text/javascript"&gt;        
      datepickr('.calendar-icon', { altInput: document.getElementById('calendar-input'), dateFormat: 'd-m-Y' });                
  &lt;/script&gt;
  </code></pre>
  
  <p><strong>One more fact. I'm familiar with JQuery and trying to make my application purely on AngularJS.</strong></p>
  
  <p>Any help in this regard would be greatly appreciated.</p>
  
  <p>Sorry for my poor English.:-)</p>
  
  <p><br/>
  Here's the plunk code: <br/>
  <a href="http://plnkr.co/edit/XxaGBOSJsEz2Imq8ZVx1" rel="nofollow">PlunKr</a></p>