-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[HOLD for payment 2021-10-11] Use default OS date picker for date fields #5340
Comments
Triggered auto assignment to @jboniface ( |
Triggered auto assignment to @francoisl ( |
Triggered auto assignment to @trjExpensify ( |
Triggered auto assignment to @deetergp ( |
Upwork issue here: https://www.upwork.com/jobs/~0123ace70fab645970 CC: @MitchExpensify @kevinksullivan as it's N6 polish. |
Proposal We can use DateTimePicker from '@react-native-community/datetimepicker', instead of TextInputWithLabel. |
Proposal
|
The date related components in I think the dev team is looking for a solution where we build a IMO Proposals should also mention if anything else would need to change - for example the current A nice to have would be to make the date-picker return consistent results - e.g. always return a |
Since the description for this issue deals specifically with iOS & Android, then going with @nikdev15's proposal seems like it would be the right choice since it makes use of the OS native date/time pickers. But @kidroca is right, a combined |
@deetrgrp I have understood that you need a component that returns the same type across all platforms. The way to do it is we can implement the OS native date picker and store it as a value in a variable. As @kidroca mentioned that the button component works with a string, we can |
I don't see eligible proposal here - they just suggest to use an external library - we have to use an lib anyway Even though the ticket is iOS/Android specific we still need to cover |
Question regarding locale: Some datepicker libraries support overriding and passing a locale, others don't Personally I'm used to and prefer to handle dates in English even when I use a localized app (or webpage) so I would like to use the Datepicker the way the system is setup |
Seems integrating this change is slightly more challenging that average
I've decided to submit a PR about this myself. I'll log the time under my hourly for the week |
@kidroca to answer your question earlier react-native date-picker has now introduced a new feature in their latest update of 2.0.0-alpha.23 version where the locale of the OS can be used. To give you a clear clarity
This is the code which will get you the locale of OS |
For style consideration: I assume we'll present the picker in a popover when the text field is clicked - the text field is read only it shows the current value and serves to open the picker when it's tapped. A picker popup should at least have a "Done" button - something to press when we're done using the spinner and are happy with the date Do we need to include the field label in the popup. I guess it would be nice to be reminded that you're editing the incorporation date, but it might be too much. An iOS sample we can use to discuss style changes Simulator.Screen.Recording.-.iPhone.12.-.2021-09-24.at.19.16.44.mp4 |
@deetergp can previous contributors simply solve the issue as I have seen @kidroca has implemented importing a date-picker although it was against his wish to do so when first-time contributors had the idea. It's absolutely barbaric to ask to post proposal ideas on GitHub as stealing of ideas can happen. When new contributors are not allowed to solve the problems why post them in the first place? |
I'm sorry @nikdev15. Indeed I didn't plan on working on the ticket, but no one was hired and this is an issue with a higher priority - it doesn't have the You proposed to import an external library and replace usages ...
But it's not as simple as that - we are migrating existing usages to a datepicker. You can take a look to some of the closed |
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.1.4-0 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2021-10-11. 🎊 |
Hey, @trjExpensify I didn't apply for this job. After the PR was accepted and merged I ended up logging the time (8h) under my hourly contract. There's no other contract to be settled. |
Perfect, okay. Closing this out then. 👍 |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Problem
The keyboard does not "match" certain fields that should only include dates within the VBA flow, which requires users to tap through to numbers within their keyboard manually. Here is where this occurs:
Company Information Step
Personal Information Step
Action Performed:
Solution
Use the default OS date picker for date fields whenever a field within the VBA flow will only include dates, like so:
Platform:
Reproducible in staging?: Yes
Reproducible in production?: Yes
Notes/Photos/Videos:
We should use the date picker pad in scenarios like this one:
Upwork issue: https://www.upwork.com/jobs/~0123ace70fab645970
View all open jobs on GitHub
The text was updated successfully, but these errors were encountered: