Date inputs with months greater or equal to the 10th month do not highlight and submit.
fix issue where date inputs with months greater or equal to the 10th month do not highlight and submit.
How can I test this?
Reproducing the issue is a bit tricky. The fastest way to reproduce the issue is to comment out the minValue and maxValue props of the <DateInput> component in packages/components/inputs/date-input/src/date-input.story.js.
Go to date-input on your storybook, check to see that values with, for example, 12/12/2022 or any date with month >=10 (Oct, Nov and Dec) do not submit. Checkout to this current work branch to check again that this PR fixes it.
Fixes: #2261
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Updated |
|---|---|---|---|
| ui-kit | ✅ Ready (Inspect) | Visit Preview | Oct 21, 2022 at 11:09AM (UTC) |
🦋 Changeset detected
Latest commit: f215855800dfc4bff54a79b95c31980016ff9ab5
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 91 packages
| Name | Type |
|---|---|
| @commercetools-uikit/date-input | Patch |
| @commercetools-uikit/date-field | Patch |
| @commercetools-uikit/inputs | Patch |
| @commercetools-uikit/fields | Patch |
| @commercetools-frontend/ui-kit | Patch |
| @commercetools-uikit/design-system | Patch |
| @commercetools-uikit/calendar-time-utils | Patch |
| @commercetools-uikit/calendar-utils | Patch |
| @commercetools-uikit/hooks | Patch |
| @commercetools-uikit/i18n | Patch |
| @commercetools-uikit/localized-utils | Patch |
| @commercetools-uikit/utils | Patch |
| @commercetools-uikit/accessible-hidden | Patch |
| @commercetools-uikit/avatar | Patch |
| @commercetools-uikit/card | Patch |
| @commercetools-uikit/collapsible-motion | Patch |
| @commercetools-uikit/collapsible-panel | Patch |
| @commercetools-uikit/collapsible | Patch |
| @commercetools-uikit/constraints | Patch |
| @commercetools-uikit/data-table-manager | Patch |
| @commercetools-uikit/data-table | Patch |
| @commercetools-uikit/field-errors | Patch |
| @commercetools-uikit/field-label | Patch |
| @commercetools-uikit/grid | Patch |
| @commercetools-uikit/icons | Patch |
| @commercetools-uikit/label | Patch |
| @commercetools-uikit/link | Patch |
| @commercetools-uikit/loading-spinner | Patch |
| @commercetools-uikit/messages | Patch |
| @commercetools-uikit/notifications | Patch |
| @commercetools-uikit/pagination | Patch |
| @commercetools-uikit/primary-action-dropdown | Patch |
| @commercetools-uikit/stamp | Patch |
| @commercetools-uikit/tag | Patch |
| @commercetools-uikit/text | Patch |
| @commercetools-uikit/tooltip | Patch |
| @commercetools-uikit/view-switcher | Patch |
| @commercetools-uikit/accessible-button | Patch |
| @commercetools-uikit/flat-button | Patch |
| @commercetools-uikit/icon-button | Patch |
| @commercetools-uikit/link-button | Patch |
| @commercetools-uikit/primary-button | Patch |
| @commercetools-uikit/secondary-button | Patch |
| @commercetools-uikit/secondary-icon-button | Patch |
| @commercetools-uikit/async-creatable-select-field | Patch |
| @commercetools-uikit/async-select-field | Patch |
| @commercetools-uikit/creatable-select-field | Patch |
| @commercetools-uikit/date-range-field | Patch |
| @commercetools-uikit/date-time-field | Patch |
| @commercetools-uikit/localized-multiline-text-field | Patch |
| @commercetools-uikit/localized-text-field | Patch |
| @commercetools-uikit/money-field | Patch |
| @commercetools-uikit/multiline-text-field | Patch |
| @commercetools-uikit/number-field | Patch |
| @commercetools-uikit/password-field | Patch |
| @commercetools-uikit/radio-field | Patch |
| @commercetools-uikit/search-select-field | Patch |
| @commercetools-uikit/select-field | Patch |
| @commercetools-uikit/text-field | Patch |
| @commercetools-uikit/time-field | Patch |
| @commercetools-uikit/async-creatable-select-input | Patch |
| @commercetools-uikit/async-select-input | Patch |
| @commercetools-uikit/checkbox-input | Patch |
| @commercetools-uikit/creatable-select-input | Patch |
| @commercetools-uikit/date-range-input | Patch |
| @commercetools-uikit/date-time-input | Patch |
| @commercetools-uikit/input-utils | Patch |
| @commercetools-uikit/localized-money-input | Patch |
| @commercetools-uikit/localized-multiline-text-input | Patch |
| @commercetools-uikit/localized-rich-text-input | Patch |
| @commercetools-uikit/localized-text-input | Patch |
| @commercetools-uikit/money-input | Patch |
| @commercetools-uikit/multiline-text-input | Patch |
| @commercetools-uikit/number-input | Patch |
| @commercetools-uikit/password-input | Patch |
| @commercetools-uikit/radio-input | Patch |
| @commercetools-uikit/rich-text-input | Patch |
| @commercetools-uikit/rich-text-utils | Patch |
| @commercetools-uikit/search-select-input | Patch |
| @commercetools-uikit/select-input | Patch |
| @commercetools-uikit/select-utils | Patch |
| @commercetools-uikit/text-input | Patch |
| @commercetools-uikit/time-input | Patch |
| @commercetools-uikit/toggle-input | Patch |
| @commercetools-uikit/spacings-inline | Patch |
| @commercetools-uikit/spacings-inset-squish | Patch |
| @commercetools-uikit/spacings-inset | Patch |
| @commercetools-uikit/spacings-stack | Patch |
| @commercetools-uikit/buttons | Patch |
| @commercetools-uikit/spacings | Patch |
| visual-testing-app | Patch |
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
Wow, thanks for finding the issue. I have no idea how this relates to the bug, but if it works then let's go for it.
A couple of things maybe to avoid this in the future:
- leave a comment of why it needs to be
if-else - (if possible) write a test that ensures this behavior is fixed
Thanks
Wow, thanks for finding the issue. I have no idea how this relates to the bug, but if it works then let's go for it.
A couple of things maybe to avoid this in the future:
- leave a comment of why it needs to be
if-else- (if possible) write a test that ensures this behavior is fixed
Thanks
Updated here: https://github.com/commercetools/ui-kit/pull/2304/commits/e70016cf7d00dca93d35f7107b9b15084d51dbb7
Thank you.