orion-ui icon indicating copy to clipboard operation
orion-ui copied to clipboard

Datepicker: Custom Disabled Dates

Open camwest opened this issue 7 years ago • 0 comments

Custom Disabled Dates

As a user
I want to see irrelevant dates disabled
So that I can avoid selecting them

Context:

Given I am on a page And there is a date picker

  • [x] Scenario: rendering disabled via default isEnabled function

Given today is 2017-01-15 When I focus the date picker And I see everything before 2017-01-15 is disabled And I see everything after 2017-01-15 is enabled

  • [x] Scenario: rendering disabled via custom isEnabled function

Given today is 2017-01-01 And I customize isEnabled to only have the next two weeks enabled When I focus the date picker Then I see 2017-01-01 to 2017-01-14 are enabled And I see the rest of the dates disabled

  • [x] Scenario: mouse interaction with disabled dates

Given 2017-01-01 is disabled When I focus the date picker And I select 2017-01-01 Then nothing happens

  • [x] Scenario: keyboard navigating disabled dates success

Given today is 2017-01-01 And I customize isEnabled to make 2017-01-02 disabled When I focus the date picker And I navigate to the next day Then 2017-01-3 is focused

  • [x] Scenario: keyboard navigating disabled dates failure

Given today is 2017-01-01 When I focus the date picker And I navigate to the previous day Then nothing happens

Done

  • [x] Test automations exist for the above scenarios
  • [x] Visual regression tests exist for all relevant view states
  • [x] Scenarios above can be accomplished in Storybook
  • [x] Scenarios above can be accomplished in React Playground
  • [x] Scenarios above can be accomplished in Angular Playground
  • [x] Scenarios above work in the latest Firefox, Safari, Chrome, and Edge

See https://github.com/orion-ui/orion/issues/65 for detailed interaction designs, wireframes, and other details.

camwest avatar Jan 28 '17 01:01 camwest