This is a migrated thread and some comments may be shown as answers.

DatePickerFor in grid - validation problem

1 Answer 225 Views
Date/Time Pickers
This is a migrated thread and some comments may be shown as answers.
Erich
Top achievements
Rank 1
Erich asked on 25 Aug 2014, 07:40 AM
Hi,
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)
        .Format(LanguageResources.Resource.DateFormat)
        .Culture(System.Threading.Thread.CurrentThread.CurrentCulture.ToString())
        %>

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 ? 

Thx


1 Answer, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 27 Aug 2014, 07:00 AM
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.

Regards,
Georgi Krustev
Telerik
 

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.

 
Tags
Date/Time Pickers
Asked by
Erich
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Share this question
or