Binding string date value to model in angular kendo date picker

2 posts, 1 answers
  1. Tulasinath
    Tulasinath  avatar
    6 posts
    Member since:
    Jul 2014

    Posted 31 Aug 2014 Link to this post

    I have an api which return the date in this format "014-08-26T15:10:45.402Z" i am using angular kendo ui .The problem i am facing is the date is not getting bound to the kendo date picker.Could someone help me out . The result is same whether I use ng-model or k-ng-model. Do we need  to convert the data in the model to date object? OR there is a much simpler way.
    <input kendo-date-picker ng-model="emp.datestart" k-format="MM/dd/yyyy" />
  2. Answer
    Kiril Nikolov
    Kiril Nikolov avatar
    2598 posts

    Posted 02 Sep 2014 Link to this post

    Hi Tulasinath,

    The Kendo UI DatePicker will work with a string date value model, you just need to tell the widget in which exact format the date will be parsed. Please check the following updated example:

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