DateTimePicker w/ k-ng-model and formatters/parsers

4 posts, 0 answers
  1. Grant
    Grant avatar
    10 posts
    Member since:
    Jan 2014

    Posted 25 Aug 2015 Link to this post

    When updating to 2015.2.805, we've discovered a NUMBER of  problems with our usage of Angular and Kendo.  We regularly update, and have had no problems previously.  We're hoping we can get some answers as to the problem.

     

    We were previously using ng-model in our binding to a Kendo DateTimePicker.  We used ng-model because we use a formatter/parser directive to manipulate the date.  In the latest release, the DateTimePicker only works if you use k-ng-model, but this precludes the use of the formatter/parser directive, because there is no ngModel.

     

    How can we use this with a formatter/parser now?

  2. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2564 posts

    Posted 27 Aug 2015 Link to this post

    Hello Grant,

     

    I am not aware of your implementation, so providing a straightforward answer is hard to do. However let me shed some light on a change that we made recently - previously the Kendo UI widgets were initialized in a timeout, which is no longer the case and can be causing this behavior. 

     

    What I would suggest you to do is either use a custom directive that will initialize the DatePicker after the parsing is completed.

     

    Regards,
    Kiril Nikolov
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
  4. Grant
    Grant avatar
    10 posts
    Member since:
    Jan 2014

    Posted 27 Aug 2015 Link to this post

    Our implementation is simple.  We use a bound value that implements a parser/formatter, which is only supported on the ngModel attribute.  In short, the date format that Kendo wants is not the format we store the data in, so we use the formatters/parsers to manage manipulation on each side of the binding.  This is a pretty standard use case.  I'm pasting my reply to a similar issue below because the root issue is the same.  Telerik should REALLY consider providing an override, or reverting this functionality.

     

    This FUNDAMENTALLY changes your Angular "support".  You use Angular directive attributes as part of your supported implementation (k-whatever), so one would more than reasonably assume that using basic angular directive attributes alongside Kendo would work as well.  We're seeing all sorts of problems throughout our application because of this change, and no noticeable increase in load performance.  In fact, the perceived load time is slower, because now instead of the initialization waiting until the basic DOM has been rendered, the Kendo JS begins rendering while there are many operations still occurring.​

     

  5. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2564 posts

    Posted 28 Aug 2015 Link to this post

    Hello Grant,

     

    Please extract a sample in a Dojo, we will be happy to take a look and provide you with a solution if possible.

     

    Regards,
    Kiril Nikolov
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top
Kendo UI is VS 2017 Ready