DatePickerFor in grid - validation problem

2 posts, 0 answers
  1. Ján Horník
    Ján Horník avatar
    10 posts
    Member since:
    Oct 2009

    Posted 25 Aug 2014 Link to this post

    I have problem with kendo date validation in kendo grid.

    I have EditorTemplate in column in kendoGrid:
    columns.Bound(p => p.DatumVznikuKontraktu).EditorTemplateName("Date").ClientTemplate("#= kendo.toString(DatumVznikuKontraktu, 'd') #" +<br>"<input type='hidden' name='ZamKontrakts[#= index(data)#].DatumVznikuKontraktu' value='#= nullTest(DatumVznikuKontraktu) #' />").HeaderHtmlAttributes(new { style = "white-space:pre-wrap; vertical-align:middle" });

    EditorTemplate Date:

    <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<DateTime?>" %>
    <%: Html.Kendo().DatePickerFor(m => m)

    Culture is SK-sk (slovakia). DateFormat - dd.MM.yyyy

    When I change a date in grid I get validation error message: The field DatumVznikuKontraktu must be a date. 

    Can you help me ? 


  2. Georgi Krustev
    Georgi Krustev avatar
    3725 posts

    Posted 27 Aug 2014 Link to this post

    Hello Ján,

    I believe that the problem is related to jQuery Validate and its inability to validate internalized dates. I would suggest you check this troubleshooting topic and the step-by-step validation tutorial.
    Let me know if something is unclear and I can assist.

    Georgi Krustev

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top