title: Compare dates fields in angularjs datepicker
body: <p>I am trying to compare two input text fields , having datepicker angular ui attached.</p>
  
  <p>The two fields are start date and end date at <a href="http://jsfiddle.net/iamkhush/8Rezs/23/" rel="nofollow">http://jsfiddle.net/iamkhush/8Rezs/23/</a>.</p>
  
  <p>I tried to attach this function on ng-change , but realised it wont work as datepicker doesnt allow it.</p>
  
  <pre><code> $scope.datechange = function(){
       if($scope.enddt &lt; $scope.startdt){
          $scope.enddt = '';
      };
  </code></pre>
  
  <p>I cant find out how to override the directive , if that's required. 
  Also I want that the datepicker should hide when input fields are not on focus.</p>