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

TKDataFormTimePickerEditor - Minutes Increment

1 Answer 39 Views
DataForm
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Gelu
Top achievements
Rank 2
Gelu asked on 12 Jan 2016, 01:50 AM

Is it possible to set the minutes increment to a value, e.g. 10min?

Thanks

Gelu

1 Answer, 1 is accepted

Sort by
0
Accepted
Adrian
Telerik team
answered on 12 Jan 2016, 02:29 PM
Hello, Gelu,

Thank you for contacting us. 

TKDataFormTimePickerEditor is subclass of TKDataFormDatePickerEditor and has a datePicker property which is of class UIDatePicker. To set a minutes interval you should set the minuteInterval property of the UIDatePicker. This should be done by implementing dataForm:setupEditor:forProperty: method of TKDataFormDelegate. Consider the code below:
override func dataForm(dataForm: TKDataForm, setupEditor editor: TKDataFormEditor, forProperty property: TKEntityProperty) {
    if property.name == "time" {
        let datePickerEditor = editor as! TKDataFormTimePickerEditor
        datePickerEditor.datePicker.minuteInterval = 15
    }
}

I hope this helps. Should you have further questions, do not hesitate to contact us.

Regards,
Adrian
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
DataForm
Asked by
Gelu
Top achievements
Rank 2
Answers by
Adrian
Telerik team
Share this question
or