title: How can I validate Ext.form.DateField using min/maxValue, without using time?
body: <p>I'm having the following problem: I want to validate a DateField so that it has a value between the minValue / maxValue range. (greater or equal, lower or equal)</p>
  
  <p>The problem is that I think the framework takes the time in milliseconds.</p>
  
  <p>I've tried using a custom vtype such as:</p>
  
  <pre><code>Ext.apply(Ext.form.VTypes,{
  dates: function(val, field){
      try{
          if(this.disabled){
              return true;
          }
  
          if(Ext.value(val,null,false)==null){
              this.datesText = "This field is required.";
              return this.allowBlank; //the text message won't be shown in case blank is allowed.
          }
  
          if(Ext.value(field.minValue,null,false)!=null){
              if(Ext.util.Format.date(val,"Ymd")&lt;Ext.util.Format.date(field.minValue,"Ymd")){
                  this.datesText = "The value is invalid.&lt;br/&gt;";
                  this.datesText = "it must be greater or equal than " + field.minValue;
                  return false;
              }
          }
  
          if(Ext.value(field.maxValue,null,false)!=null){
              if(Ext.util.Format.date(val,"Ymd")&gt;Ext.util.Format.date(field.maxValue,"Ymd")){
                  this.datesText = "The value is invalid.&lt;br/&gt;";
                  this.datesText = "It must be lower or equal than " + field.maxValue;
                  return false;
              }
          }
  
          return true;
  
      }catch(e){
          return false;
      }
  },
  datesText: 'The value is invalid.', //error message
  datesMask: / /  //regexp to filter the characters allowed
  </code></pre>
  
  <p>});</p>
  
  <p>Basically what it does is convert the values to a '<strong>Ymd</strong>' format and then compare values as numbers.</p>
  
  <p>If I debug this code, the validation goes okay, but for some reason I still get an error message. I believe the framework is trying to validate the field again after my validation.</p>
  
  <p>Thank you!</p>
  
  <p>Sebastián</p>