Xamarin.forms: xamarin forms Picker selects the wrong value

Created on 19 Jan 2018  路  4Comments  路  Source: xamarin/Xamarin.Forms

Description

Xamarin forms Picker select the wrong value on Done. (this is not about speed as in other reported bugs).

Steps to Reproduce

On iOS device/simulator

There are 2 scenarios to reproduce this issue, both are based on bad index being selected.

Steps: (use Picker Demo https://developer.xamarin.com/samples/xamarin-forms/UserInterface/PickerDemo/)

Scenario 1:

  • click on picker
  • select an item
  • and click done.
  • the selection is not the same as the one you have picked.

Scenario 2:

  • change the picker to have " iOSSpecific:Picker.UpdateMode="WhenFinished" and run.
  • click on picker
  • select an item
  • click done
  • the selection is correct, however, if you click on the picker again, the selected item in the list is wrong and it's the same value that failed in scenario 1.

Expected Behavior

should select item

Actual Behavior

selecting the wrong item or defaulting to wrong item on next selection

Basic Information

  • Version with issue:
  • Last known good version:
  • IDE: fORMS 2.5.0.122203
  • Platform Target Frameworks:

    • iOS: 11.2
  • Nuget Packages: Only forms in PickerDemo

  • Affected Devices:

Screenshots

Reproduction Link

invalid iOS 馃崕

Most helpful comment

Solution: Restart your emulator, removed the app and built again (wasted so much time, hope this helps others)
Question: Why did it happen? Is it an iOS emulator issue or a Xamarin issue?

All 4 comments

Solution: Restart your emulator, removed the app and built again (wasted so much time, hope this helps others)
Question: Why did it happen? Is it an iOS emulator issue or a Xamarin issue?

I'd say an emulator issue

The same is happening with me, on different emulators, but the more weird is that is also happening when I run the test on app center. Any suggestion, please?
I already tried to restart the emulator, remove the app and do a new build

I found the problem for my case. On date pick I need to use a conversion to localtime, as me and apparently app center too are on a different timezone

Was this page helpful?
0 / 5 - 0 ratings