[DataType(DataType.DateTime)]
[Display(Name = "Start Date")]
public DateTime StartDate { get; set; }
[DataType(DataType.Time)]
[Display(Name = "Start Time")]
public DateTime StartTime { get; set; }
[DataType(DataType.DateTime)]
[Display(Name = "End Date")]
public DateTime? EndDate { get; set; }
[DataType(DataType.Time)]
[Display(Name = "End Time")]
public DateTime? EndTime { get; set; }
public class DataFormLayoutManagerExt : DataFormLayoutManager
{
public DataFormLayoutManagerExt(SfDataForm dataForm) : base(dataForm)
{
}
protected override void OnEditorCreated(DataFormItem dataFormItem, View editor)
{
if (editor is TimePicker)
(editor as TimePicker).TextColor = Color.Blue;
editor.BackgroundColor = Color.Yellow;
}
}
dataForm.LayoutManager = new DataFormLayoutManagerExt(dataForm);