title: angular2- formbuilder, validators and testing end date is greater then start date
body: <p>I have a start and enddate input tags my html</p>
  
  <p>I use angular the FormBuilder and custom Validators to ensure that that start date and end dates are valid.</p>
  
  <p>In my component here is my snippet:</p>
  
  <pre><code>this.form = fb.group({
              startdate: ['',Validators.compose([Validators.required,ModelValidators.validStartDate])],
              enddate: ['',Validators.compose([Validators.required,ModelValidators.validEndDate])],
  
          });
  </code></pre>
  
  <p>Here are my validators:</p>
  
  <pre><code>static validStartDate(control: Control){
          var valid: any;
          valid=null;
          var diff:any;
          diff = new Date(control.value).valueOf() - new Date('1999-01-01').valueOf();
          if (diff&gt;=0){
              valid=true;
          }
          return valid ? null : { validStartDate: true };
  
      }
  
      static validEndDate(control: Control){
          var valid: any;
          valid=null;
          var diff:any;
          diff = new Date().valueOf() - new Date(control.value).valueOf();
          if (diff&gt;3600*24){
              valid=true;
          }
          return valid ? null : { validEndDate: true };
      }
  </code></pre>
  
  <p>Now..how can I validate that the enddate is greater than the start date and that the enddate - startdate is greater then 1 year?</p>
  
  <p>E.g. Is is possible to pass other data to the ModelValidators.validEndDate function?</p>