Skip to content

Fix DatePicker default Style #188

Closed
Closed

Description

@FrancoisM

I'm submitting a...

Bug report (I searched for similar issues and did not find one)

Current behavior

When adding a DatePicker on a page, it renders directly in its "edit" mode (i.e the "popup" to select a day with "cancel" and "ok" buttons at the bottom).
Moreover, that "popup" isn't one as it is constrained to its parent (say a row in a grid) instead of being in front of all other controls in the page. As such, if it doesn't have enough room, it is cropped and the user cannot see the "cancel" and "ok" buttons.

Expected behavior

The DatePicker should display the bounded date and only show the "popup" once the user tap on the control. Then the "popup" should be centered in the in front of every other controls.

Minimal reproduction of the problem with instructions

The following xaml should be enough:

<Grid>
    <Grid.RowDefinitions>
         <RowDefinition Height = "*">
         <RowDefinition Height = "*">
         <RowDefinition Height = "*">
         <RowDefinition Height = "*">
    </Grid.RowDefinitions>
    <DatePicker Date="{Binding Date}" Grid.Row=0 />
    <DatePicker Date="{Binding Date}" Grid.Row=1 />
    <DatePicker Date="{Binding Date}" Grid.Row=2 />
    <DatePicker Date="{Binding Date}" Grid.Row=3 />
</Grid>

Environment

Nuget Package: Uno.UI

Package Version(s): 1.31.0-dev.184

Affected platform(s):
- [ ] iOS
- [x] Android
- [ ] WebAssembly
- [ ] Windows
- [ ] Build tasks

Visual Studio
- [x] 2017 (version: 15.8.2 )
- [ ] 2017 Preview (version: )
- [ ] for Mac (version: )

Activity

  1. added
    kind/bug
    on Sep 12, 2018
  2. HaoLife commented on Sep 27, 2018

    @HaoLife

    image
    Display of DatePicker on Android

    image
    Display of DatePicker on Windows

    Whether Android can display the same as Windows
    @jeromelaban

  3. FrancoisM commented on Sep 27, 2018

    @FrancoisM
    Author

    Uno gave me that style that (almost) works.
    When date is defined it almost looks like UWP (except no border) and we tap on it, it opens the android date selector fine.

  4. davidjohnoliver commented on Sep 27, 2018

    @davidjohnoliver
    Contributor

    Yes the default DatePicker style needs to be fixed in Uno, the workaround is to base off the style linked by @FrancoisM .

  5. self-assigned this
    on Oct 15, 2018
  6. changed the title [-]DatePicker do not render properly in Android[/-] [+]Add support for DatePicker[/+] on Nov 16, 2018
  7. added
    platform/android 🤖
    on May 22, 2019
  8. changed the title [-]Add support for DatePicker[/-] [+]Fix DatePicker default Style[/+] on Jun 27, 2019
  9. added
    area/xf-wasm-renderers
    on Oct 3, 2019
  10. added a commit that references this issue on Oct 8, 2019
    ec55fb0
  11. added a commit that references this issue on Oct 18, 2019
    ad49034
  12. TopperDEL commented on Nov 24, 2019

    @TopperDEL
    Contributor

    Is there a plan on when this is going to be merged? I desperately Need a working DatePicker on Android.
    The given Workaround leads to Problems with UWP. Furthermore, the Date-Binding does not work an Android with that style (or I'm simply tired and Dump now).

  13. TopperDEL commented on Dec 3, 2019

    @TopperDEL
    Contributor

    It seems I have the same issues on iOs. Is there a working reference-implementation for Date- and TimePicker available where I can check my implementation?

  14. added 10 commits that reference this issue on Apr 13, 2020
    d5d75b1
    3f369c1
    94e5540
    c493855
    380dc6e
    5480113
    71f3b05
    4180730
    76baae2
    4f87d45
  15. added 3 commits that reference this issue on May 29, 2020
    7789d3a
    61dc7e1
    d8aac58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/xf-wasm-rendererskind/bugplatform/android 🤖

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions