Skip to content
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

STRF-3496: Create year option in date picker if earliest year equals … #1125

Merged
merged 3 commits into from
Dec 8, 2017

Conversation

bdav87
Copy link
Contributor

@bdav87 bdav87 commented Nov 28, 2017

What?

When the date picker product option has a date restriction within one year, the year options do no populate on the product page, preventing a shopper from adding the item to the cart if the option is required.

This fix creates an option for the year if the earliest_year and latest_year are the same.

Tickets / Documentation

https://jira.bigcommerce.com/browse/STRF-3496

Screenshots (if appropriate)

Before:
screen shot 2017-11-28 at 1 42 27 pm

After:
screen shot 2017-11-28 at 1 43 24 pm

@bigbot
Copy link

bigbot commented Nov 28, 2017

Autotagging @bigcommerce/stencil-team @davidchin

Copy link
Contributor

@PascalZajac PascalZajac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would probably structure this a bit differently for the sake of improving the UX - either by pre-selecting the only option (by adding the selected attribute), or by changing the field entirely, for example making it hidden unless the user actually needs to pick a choice.

@bdav87
Copy link
Contributor Author

bdav87 commented Dec 5, 2017

Updated to auto-select the year if only 1 year is available in the date picker.

Copy link
Contributor

@PascalZajac PascalZajac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. You need to update the README with a fix note.

@junedkazi
Copy link
Contributor

@bdav87 can you add an entry into the changelog file. See https://github.com/bigcommerce/cornerstone/pull/1131/files as an example.

@PascalZajac PascalZajac merged commit 935f28c into bigcommerce:master Dec 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants