title: Angularjs and Jquery datepicker data-binding
body: <p>I was making a project with a datepicker(JQuery) . When i click the date in the datepicker it never shows the date unless space or enter is typed. I want it that when I click the date, the date clicked is showed.</p>
  
  <p>I expect the output to be automatically show the date when clicking the date in datepicker. But I have to press spacebar first before it generates/ show the date .. Please help ..
  These are my codes :</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>  $(document).ready(function () {
                  $("#datepickerfrom").datepicker({
                      numberOfMonths: 1,
                      onSelect: function (selected) {
                          $("#datepickerto").datepicker("option", selected)
                      }
                  });
                  $("#datepickerto").datepicker({
                      numberOfMonths: 1,
                      onSelect: function (selected) {
                          $("#datepickerfrom").datepicker("option", selected)
                      }
                  });
                 //  jQuery object; this demo
              });
              function GetbyDate(fr, t) {
                  var from = new Date(t)
              };
  
              scope.changeDate = function () {
                  scope.models = null;
                  http.get('GetReportList?from=' + scope.filter_fromDate + '&amp;to=' + scope.filter_toDate).success(
                      function (data) {
                          scope.models = data;
                      });
              }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>              &lt;p class="input-group"&gt;
  
                                  &lt;input type="text" class="form-control" id="datepickerfrom" data-ng-model="filter_fromDate" /&gt;
                                  
                                  &lt;span class="input-group-btn"&gt;
                                      &lt;button type="button" class="btn btn-default"&gt;
                                          &lt;i class="glyphicon glyphicon-calendar"&gt;&lt;/i&gt;
                                      &lt;/button&gt;
                                  &lt;/span&gt;
                                  {{filter_fromDate}}
                              &lt;/p&gt;
  
                              &lt;p class="input-group"&gt;
                                  &lt;input type="text" class="form-control" id="datepickerto" data-ng-model="filter_toDate" /&gt;
                                  &lt;span class="input-group-btn"&gt;
                                      &lt;button type="button" class="btn btn-default"&gt;
                                          &lt;i class="glyphicon glyphicon-calendar"&gt;&lt;/i&gt;
                                      &lt;/button&gt;
                                  &lt;/span&gt;
                                  {{filter_toDate}}
                              &lt;/p&gt;</code></pre>
  </div>
  </div>
  </p>