Kendo DateTimePicker validation erro must be a date (but it is)

3 posts, 0 answers
  1. John
    John avatar
    2 posts
    Member since:
    Nov 2014

    Posted 13 Apr Link to this post

    I need to use a specific date time format dd-MMM-yyyy HH:mm. I am getting a validation error "The field Start Date Time must be a date." when using "13-Apr-2016 11:12" which should be valid. 


      @using (Html.BeginForm())

                    @Html.HiddenFor(m => m.PersonId)


                              .HtmlAttributes(new { placeholder = "dd-MMM-yyyy HH:mm" })
                              .Format("dd-MMM-yyyy HH:mm")
                              .ParseFormats(new[] { "dd-MMM-yyyy HH:mm" })

      <input type="submit" value="OK" name="submitButton" />



    public class ConfirmPGDViewModel


            public long PersonId { get; set; }

            [Display(Name = "Start Date Time")]
            public DateTime? StartDate { get; set; }



     public ActionResult ConfirmPGD(long personId)
                         var viewModel = new ConfirmPGDViewModel

                        PersonId = personId,                    

                        StartDate = DateTime.Now,                    

    return this.View(viewModel);


  2. John
    John avatar
    2 posts
    Member since:
    Nov 2014

    Posted 13 Apr in reply to John Link to this post

    I'm using kendo ui 2015.3.1111 jquery-1.11.1
  3. Dimiter Topalov
    Dimiter Topalov avatar
    310 posts

    Posted 15 Apr Link to this post

    Hi John,

    Please check out the following section of our documentation and apply the necessary adjustments to your implementation:

    Let me know if you need further assistance.

    Dimiter Topalov
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top