Hi.I have currently developed a TimePicker from SfPicker(have 2 columns,Hour and Minute),but we have an oddity required from our bosses,that the timePicker should have 24:00 as well.so I added 24 to hours and change from code the minute collection to not have the other values only 00(normally we have 4 values,00,15,30,45 , so users can select 15 minute step values).now on iOS removing of the minute collection works,but instead when I try to add/insert a new collection,it crashes. I am trying all kind of workarounds to solve this issue,but cannot.Do you have any ideas? It would be also nice if I could simply select the desired value but that does not work on iOS either(after that I would need to lock the selection on 00).
So,this is what I am doing,neither the collection.Add or the selectedItems[1] assignment works on iOS,can you help us out?:
var collection = picker.ItemsSource as ObservableCollection<object>;
if (Time?.Count > 1 && IsOpen)
{
collection.RemoveAt(1);
collection.Add(newMinuteCollection);
var selectedItems = picker.SelectedItem as ObservableCollection<object>;
if (selectedItems?.Count > 1)
{
var newSelectedMinute = Minute00 as object;
selectedItems[1] = newSelectedMinute;
}
}
Regards,Norbert