DatePicker not working in the grid

2 posts, 0 answers
  1. Randy
    Randy avatar
    75 posts
    Member since:
    Jul 2009

    Posted 23 Jul 2017 Link to this post

    I have an MVC grid with a datetime column. I am using the Kendo DatePicker for the column. Edit mode for the grid is set to InLine. When the user clicks on the row, the row goes into edit mode. The datePicker for my datetime column displays correctly but when I click on the date icon to display the calendar, nothing happens. 

    The MVC code for the column looks like this:

    columns.Bound(p => p.DateOfSale).Title("Date of Sale").EditorTemplateName("DatePicker").ClientTemplate("#= DateOfSale ? moment.utc(DateOfSale,'MM/DD/YYYY').format('MM/DD/YYYY') : ''#").Width(120);

    My DatePicker code is this:

    @using Kendo.Mvc.UI
    @model DateTime?
    @(Html.Kendo().DatePickerFor(m => m)
        .Format("MM/dd/yyyy")
        )

  2. Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    2062 posts

    Posted 26 Jul 2017 Link to this post

    Hello,

    At first sight it seems that there is a JavaScript error on the page and prevents the calendar from opening. Otherwise there is no obvious reason why the calendar is not shown when calendar icon is clicked, but the picker displays the date correctly. Could it be possible to check the browser's developer console for any errors? 

    Regards,
    Boyan Dimitrov
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top