Skip to content

Conversation

@austingreendev
Copy link
Contributor

@austingreendev austingreendev commented Jul 30, 2019

Description

This PR introduces the DatepickerRange component. To allow for additional flexibility in input and calendar placement, this component uses the following API:

<DatepickerRange>
  <DatepickerRange.Start>
    <input />
  </DatepickerRange.Start>
  <DatepickerRange.End>
    <input />
  </DatepickerRange.End>
  <DatepickerRange.Calendar />
</DatepickerRange>

This type of composition allows consumers to determine which type of inputs will be used and how they can be laid out. In the provided example I use our react-forms and react-grid components for the dynamic layout.

Detail

2019-07-30 11-25-06 2019-07-30 11_26_04

Checklist

  • 👌 design updates are Garden Designer approved (add the
    designer as a reviewer)
  • 💅 view component styling is based on a Garden CSS
    component
  • 🌐 Styleguidist demo is up-to-date (yarn start)
  • ⬅️ renders as expected with reversed (RTL) direction
  • ♿ analyzed via axe and evaluated using VoiceOver
  • 💂‍♂️ includes new unit tests
  • 📝 tested in Chrome, Firefox, Safari, Edge, and IE11

@austingreendev austingreendev requested a review from a team July 30, 2019 18:26
@coveralls
Copy link

coveralls commented Jul 30, 2019

Coverage Status

Coverage increased (+0.4%) to 95.815% when pulling f766921 on agreen/datepicker-range into c257b6c on master.

Copy link
Member

@jzempel jzempel left a comment

Choose a reason for hiding this comment

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

The interaction between the ranged date picker and the associated start/end inputs feels off to me. It's strange that if I'm focused in the end field that the start date would reset by clicking a new end date. If I fat-finger the end date by one (for example), I want to be able to easily adjust by clicking a new end date. The user interaction feels like the date range should adjust whichever field has focus. I'm sure there are 1k edge cases that make whatever I'm saying super complicated.

@austingreendev
Copy link
Contributor Author

The interaction between the ranged date picker and the associated start/end inputs feels off to me

@ginnywood and I sat down and re-worked some of the focus strategy for this interaction. The component now alternates selection based on previous selection. It now also allows ENTER key presses to validate the date input.

Copy link

@ginnywood ginnywood left a comment

Choose a reason for hiding this comment

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

hqdefault

@ryanseddon
Copy link
Contributor

ryanseddon commented Aug 5, 2019

I noticed a weird bug while testing the custom format example, but it turns out you're just missing the locale being set for the dateFormatter in the custom-formats.md example.

What happens for me as it tries to switch to my locale on close which is dd/mm/yyyy but the example sets the initial locale to en-US of mm/dd/yyyy.

datepicker

@austingreendev austingreendev merged commit 2665685 into master Aug 8, 2019
@austingreendev austingreendev deleted the agreen/datepicker-range branch August 8, 2019 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

6 participants