-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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 2023-01-25] Date inputs allow 5 to 6 digits as year in Manual journey of Connect Bank Account #13837
Comments
Oh yes, I've seen this one! Will take a look. |
Job added to Upwork: https://www.upwork.com/jobs/~01a092ee76a867ed09 |
Triggered auto assignment to Contributor Plus for review of internal employee PR - @mollfpr ( |
Hmmm... I'm not sure what's happening here but it seems like we'd need a Anyway, it's consistently reproducible and is purely front-end so will flip this External. |
Current assignee @arielgreen is eligible for the External assigner, not assigning anyone new. |
Current assignee @mollfpr is eligible for the External assigner, not assigning anyone new. |
Current assignee @yuwenmemon is eligible for the External assigner, not assigning anyone new. |
Current assignee @arielgreen is eligible for the External assigner, not assigning anyone new. |
Current assignee @mollfpr is eligible for the External assigner, not assigning anyone new. |
Current assignee @yuwenmemon is eligible for the External assigner, not assigning anyone new. |
Proposal It seems diff --git a/src/CONST.js b/src/CONST.js
index ef02585f6..277c4daac 100755
--- a/src/CONST.js
+++ b/src/CONST.js
@@ -41,6 +41,7 @@ const CONST = {
DATE: {
MOMENT_FORMAT_STRING: 'YYYY-MM-DD',
UNIX_EPOCH: '1970-01-01 00:00:00.000',
+ MAX_DATE: '9999-12-31',
},
SMS: {
DOMAIN: '@expensify.sms',
diff --git a/src/components/DatePicker/index.js b/src/components/DatePicker/index.js
index 2983ce762..29e2ee93c 100644
--- a/src/components/DatePicker/index.js
+++ b/src/components/DatePicker/index.js
@@ -30,6 +30,7 @@ class DatePicker extends React.Component {
componentDidMount() {
// Adds nice native datepicker on web/desktop. Not possible to set this through props
this.inputRef.setAttribute('type', 'date');
+ this.inputRef.setAttribute('max', CONST.DATE.MAX_DATE);
this.inputRef.classList.add('expensify-datepicker');
} Screen.Recording.2023-01-12.at.8.00.04.AM.mov |
Ah so simple! This makes sense to me. @mollfpr thoughts? |
Proposalwe can pass the expected format parameter to diff --git a/src/components/DatePicker/index.js b/src/components/DatePicker/index.js
index 2983ce7620..cd06957c4e 100644
--- a/src/components/DatePicker/index.js
+++ b/src/components/DatePicker/index.js
@@ -43,7 +43,7 @@ class DatePicker extends React.Component {
return;
}
- const asMoment = moment(text);
+ const asMoment = moment(text, CONST.DATE.MOMENT_FORMAT_STRING);
if (asMoment.isValid()) {
this.props.onInputChange(asMoment.format(CONST.DATE.MOMENT_FORMAT_STRING));
} |
@arielgreen I think the split is fine. However I think the bonus for the timely PR should be split as well. Since any of the 3 could have been able to do the timely PR if he's chosen to implement the PR. And @Pujan92 already got the (2x) bigger original split for the added effort of implementing the PR. If the bonus only goes to the one implementing the PR, then the original split should be equal (a.k.a 1/3 for each). Just my 2 cents. |
@tienifr just to point out I already mentioned your solution in my initial proposal with the drawback. Only thing I wasn't aware of the safari/firefox date support issue for which we would need to consider that as a partial solution. So I believe if your proposal differs and smoothly fixes the issue then definitely you get the job. |
@Pujan92 I interpret it as dismissing that solution, much like when I point out your proposal's potential issue here, rather than you proposing an alternate proposal (which should have accompanied code change and clear indication of such, ...). So I assume my proposal is the first one recommending that solution, which, along with your actual solution, goes into the final code change. Anyway, let's leave the team to make the call here. Thanks! |
Thanks for your thoughts. Seems fair. Offers sent to all. |
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.2.55-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 2023-01-25. 🎊 After the hold period, please check if any of the following need payment for this issue, and if so check them off after paying:
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
Not overdue, this is in its regression period. |
@mollfpr @yuwenmemon please be sure to complete the checklist here. |
@arielgreen Thanks for the ping! Will finish the checklist today. |
Thanks @mollfpr - let me know if I can be of assistance. |
Previously we have Here's the PR #13702 that removes the cc @yuwenmemon |
@arielgreen last item in the checklist is all yours! |
Bump @arielgreen |
All payments have been issued. Discussing a test here, then we can close this one out. |
Bumped thread for consensus |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Action Performed:
Expected Result:
Year value should only allow 4 digits
Actual Result:
User can enter upto 6 digits
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.2.43-1
Reproducible in staging?: y
Reproducible in production?: y
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos:
Expensify/Expensify Issue URL:
Issue reported by: @daraksha-dk
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1672076005803659
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: