title: Date Validations - StartDate, EndDate MVC
body: <p>I need to do validation on StartDate and EndDate </p>
  
  <p>Validations: </p>
  
  <ul>
  <li>StartDate must be set value less than or equal to Endate.</li>
  <li>EndDate must be set greater than or equal to startdate.</li>
  </ul>
  
  <p>So far my code: </p>
  
  <p>object: </p>
  
  <pre><code>    [DisplayName("Effective Start Date")]
      [DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:MM/dd/yyyy}")] 
      public DateTime EffectiveStartDate { get; set; }
  
      [DisplayName("Effective End Date")]
      [DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:MM/dd/yyyy}")] 
      public DateTime EffectiveEndDate { get; set; }
  </code></pre>
  
  <p>View:</p>
  
  <pre><code>   &lt;/tr&gt;  
            &lt;tr&gt;
              &lt;td class="lables"&gt;&lt;%= Html.LabelFor(model =&gt; model.EffectiveEndDate)%&gt;&lt;/td&gt;
              &lt;td class="data" id = "endDate"&gt;&lt;%= Html.EditorFor(model =&gt; model.EffectiveEndDate)%&gt;
              &lt;%= Html.ValidationMessageFor(model =&gt; model.EffectiveEndDate)%&gt;&lt;/td&gt;
          &lt;/tr&gt;  
            &lt;tr&gt;
              &lt;td class="lables"&gt;&lt;%= Html.LabelFor(model =&gt; model.ErrorCheckEnabled)%&gt;&lt;/td&gt;
              &lt;td class="data" &gt;&lt;%= Html.TextAreaFor(model =&gt; model.ErrorCheckEnabled)%&gt;
               &lt;%= Html.ValidationMessageFor(model =&gt; model.EffectiveEndDate)%&gt;&lt;/td&gt;
          &lt;/tr&gt; 
  </code></pre>
  
  <p>How should I go with validation.  Should I do on client site on </p>
  
  <pre><code>$("#frm").validate
  </code></pre>
  
  <p>[or]</p>
  
  <p>???</p>