Skip to content

Cannot change TimePicker format #1140

@mattavadine

Description

@mattavadine

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

Version Information

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions