Is there anyway to disable certain hour and minutes from the editor when it is shown to user? Eg., I would like to make only 00, 15, 30 and 45 minutes available for selection. Can this be done at design time statically and runtime dynamically?
1 Answer, 1 is accepted
answered on 26 Jun 2017, 11:25 AM
The Xamarin.Forms DataForm does not expose such functionality out of the box. We have a feature request logged to expose a mechanism to use a custom editor which you can track on the following link - DataForm: Implement Custom Editor.
Apart from that you can check the documentation of the native controls and try to implement the functionality you are looking for by creating a custom renderer and modifying the native control. Here are the documentation for iOS and Android. The task is easily achievable in iOS by modifying the TKDataFormTimePickerEditor used:
this.Control.Delegate = new CustomDataFormDelegate();
class CustomDataFormDelegate : TKDataFormDelegate
public override void SetupEditor(TKDataForm dataForm, TKDataFormEditor editor, TKEntityProperty property)
if (property.Name == "Time")
var datePickerEditor = editor as TKDataFormTimePickerEditor;
datePickerEditor.DatePicker.MinuteInterval = 15;
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