UIDatePicker mismatch between displayed value and Date property value

Michael_ShapiroMichael_Shapiro USMember ✭✭✭

Hi. It's been a while since I asked a question here. But I have a situation here I cannot explain. Hope to get some help or directions, please.

A screen has UIDatePicker with the following:
Mode = Time
MinuteInterval = 15

The screen shows up, I do NOT explicitly set the time with SetDate(), so the time picker assumes the current time whatever it is. Let's say it is now 11:34 AM (US locale, but it doesn't matter). BUT there is an explicit interval of 15 minutes set above, right? So, the TimePicker does NOT display the actual current time and instead displays the value closest to the interval set above 11:30 AM.

Here is the problem - if I read the Date property of the TimePicker it returns me the 11:34 AM instead of the actually displayed value. wtf??? Any ideas how to mitigate this issue? The Apple documentation clearly states that the Date property returns the displayed value. How do I get the displayed value in stead of internally assumed value? Is it a bug?




  • ColeXColeX Member, Xamarin Team Xamurai
    edited November 2018

    Here is a similar case , check for helping.

Sign In or Register to comment.