title: angularjs bootstrap datepicker value not getting changed when selecting second time
body: <p>Currently I'm working on a <strong>datepicker</strong> for <strong>angularjs</strong> which is working as expected. But when I'm trying to select value second time from datepicker, the value is not getting changed. Following is the code snippet so far I've tried :-</p>
  
  <p><strong><em>HTML</em></strong></p>
  
  <pre><code>&lt;div id="dvFromDate" class='input-group date' datetimepicker ng-model="FromDate"&gt;
                                      &lt;input type="text" ng-model="FromDate" class="form-control" @*tooltips tooltip-template="dd/mm/yyyy"*@ required&gt;
                                      &lt;span class="input-group-addon"&gt;
                                          &lt;span class="glyphicon glyphicon-calendar"&gt;&lt;/span&gt;
                                      &lt;/span&gt;
                                  &lt;/div&gt;
                                  &lt;script type="text/javascript"&gt;
                                      $(function () {
                                          $('#dvFromDate').datetimepicker({
                                              format: 'DD/MM/YYYY'
                                          });
                                      });
  
                                  &lt;/script&gt;
  </code></pre>
  
  <p><strong><em>AngularJs</em></strong></p>
  
  <pre><code>    app.directive('datetimepicker', function () {
      return {
          require: '?ngModel',
          restrict: 'A',
          link: function (scope, element, attrs, ngModel) {
              if (!ngModel) return; // do nothing if no ng-model
              ngModel.$render = function () {
                  element.find('input').val(ngModel.$viewValue || '');
              }    
  
              element.on('dp.change', function () {
                  scope.$apply(read);
              });
  
              read();
  
              function read() {
                  var value = element.find('input').val();
                  ngModel.$setViewValue(value);
              }
          }
      }
  });
  </code></pre>
  
  <p>I am also setting the datepicker value to empty string on a <strong>selectionchanged</strong> event of <strong>select dropdown</strong> like the following :-</p>
  
  <pre><code>$scope.FromDate = '';
  $scope.ToDate = '';
  </code></pre>
  
  <p>After setting the dropdown value to empty string, whenever I select any value from datepicker, value is getting null. 
  Any kind of help would be appreciated.</p>