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

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

3 Answers 70 Views
Date/Time Pickers
This is a migrated thread and some comments may be shown as answers.
Scantron-Morrisville
Top achievements
Rank 1
Scantron-Morrisville asked on 25 Aug 2015, 02:03 PM

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?

3 Answers, 1 is accepted

Sort by
0
Kiril Nikolov
Telerik team
answered on 27 Aug 2015, 07:28 AM

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!
 
0
Scantron-Morrisville
Top achievements
Rank 1
answered on 27 Aug 2015, 01:21 PM

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.​

 

0
Kiril Nikolov
Telerik team
answered on 28 Aug 2015, 07:45 AM

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!
 
Tags
Date/Time Pickers
Asked by
Scantron-Morrisville
Top achievements
Rank 1
Answers by
Kiril Nikolov
Telerik team
Scantron-Morrisville
Top achievements
Rank 1
Share this question
or