title: Kendo UI MVC Datepicker Format Validation Errors
body: <p>I use two types of date formats:</p>
  
  <ol>
  <li>MM.yyyy</li>
  <li>dd.MM.yyyy</li>
  </ol>
  
  <p>I created Editor Templates to handle all my different inputs.</p>
  
  <p>I know that Kendo has some <a href="http://docs.telerik.com/kendo-ui/aspnet-mvc/validation#globalized-dates-and-numbers-are-not-recognized-as-valid-when-using-the-kendo-ui-validator" rel="nofollow">issues</a> when using date formats that aren't in the selected culture. Thus, I would always get a validation error "The field MEAS DATE must be a date."</p>
  
  <p>I have added the code as they suggested. This DOES fix the format issue. But now for some reason, validation on my TextBox fields break. A Validation Error is shown, although the data entered is correct. The error only shows the little warning icon without any text.</p>
  
  <p>Is there any reason for this happening?</p>
  
  <p>The fields in the Model:</p>
  
  <pre><code>[DisplayName("CONTRACT")]
  [Required(ErrorMessage="{0} IS REQUIRED")
  [UIHint("TextInput")]
  [AdditionalMetadata("Class", "green-field")]
  [AdditionalMetadata("MaxLength", "10")]
  public string ContractNo { get; set; }
  
  [DisplayName("MEAS DATE")]
  [UIHint("DateInput")]
  [AdditionalMetadata("Class", "green-field")]
  [AdditionalMetadata("Format", "dd.MM.yyyy")]
  public DateTime MeasurementDate { get; set; }
  </code></pre>
  
  <p>Editor Template for DateTime:</p>
  
  <pre><code>@model DateTime?
  @{
     var values = ViewData.ModelMetadata.AdditionalValues;
     var name = ViewData.ModelMetadata.PropertyName;
   }
  
  @if (values["Class"].ToString().Equals("blue-field"))
  {
     @(Html.Kendo().DatePickerFor(m =&gt; m)
      .Format(values["Format"].ToString())
      .HtmlAttributes(new { @class = values["Class"] })
      .Enable(false)
      .Value(Model)
       )
  }
  else
  {
    @(Html.Kendo().DatePickerFor(m =&gt; m)
      .Format(values["Format"].ToString())
      .HtmlAttributes(new { @class = values["Class"] + " date" })
      .Value(Model)
      )
  }
  </code></pre>
  
  <p>Editor Template for strings:</p>
  
  <pre><code>@model string
  
  @{ 
     var values = ViewData.ModelMetadata.AdditionalValues;
     var name = ViewData.ModelMetadata.PropertyName;
   }
  
  @if (values["Class"].ToString().Equals("blue-field"))
  {
      @(Html.Kendo().TextBoxFor(m =&gt; m)
       .HtmlAttributes(new { @class = values["Class"].ToString() + " helper",   @maxlength = values["MaxLength"].ToString() })
       .Enable(false)
       .Value(Model)
      )
  }
  else
  {
      @(Html.Kendo().TextBoxFor(m =&gt; m)
         .HtmlAttributes(new { @class = values["Class"].ToString() + " helper", @maxlength = values["MaxLength"].ToString() })
       )
  }
  </code></pre>