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

Can I use a "mediator" between a kendo-timepicker and the form control?

1 Answer 216 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Peter
Top achievements
Rank 1
Peter asked on 28 Feb 2018, 02:09 PM
I have many objects that use a custom TimeSpan object for representing times. I want to use a kendo- control to edit these values. Is there some way I can create a directive that will let me intercept read/write of the  value so that I can and have my form data as TimeSpan but kendo- read/write a Date object?

1 Answer, 1 is accepted

Sort by
0
Accepted
Georgi Krustev
Telerik team
answered on 01 Mar 2018, 08:38 AM
Hello Peter,

A custom Directive can be used to override the `value / valueChange` properties:
If `ngModel / formControl` should be supported, then you will need to wrap the component into a custom one and implement the ControlValueAccessor, just like in this plunkr:
Let me know if something is not clear.

Regards,
Georgi Krustev
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
General Discussions
Asked by
Peter
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Share this question
or