Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.

Cannot change TimePicker format #1461

Closed
jonpryor opened this issue Dec 22, 2017 · 2 comments · Fixed by #1780
Closed

Cannot change TimePicker format #1461

jonpryor opened this issue Dec 22, 2017 · 2 comments · Fixed by #1780

Comments

@jonpryor
Copy link
Member

Bug report best practices: https://github.com/xamarin/Xamarin.Forms/wiki/Submitting-Issues

Steps to Reproduce

  1. Turn the "Use 24-hour format" device setting off on your test device
  2. Create a TimePicker
  3. Change the format sometime later on (e.g. when the user clicks a button)

Expected Behavior

TimePicker displays time in new format

Actual Behavior

TimePicker still displays time in original format

Basic Information

  • Version with issue: Xamarin.Forms 2.5.0.91635

Proposed Fix

I can see the problem in Xamarin.Forms.Platform.Android.TimePickerRenderer. The format is cached in OnElementChanged then never gets updated. Presumably, the format just needs to be refreshed in OnElementPropertyChanged if FormatProperty has changed.

@jonpryor
Copy link
Member Author

Moved from: dotnet/android#1140

@samhouts
Copy link
Member

samhouts commented Jan 2, 2018

Issue1461.zip

rmarinho pushed a commit that referenced this issue Feb 15, 2018
* timepicker fix

* fix logic error

* Update Xamarin.Forms.Controls.Issues.Shared.projitems
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants