carbon-addons-iot-react icon indicating copy to clipboard operation
carbon-addons-iot-react copied to clipboard

[DateTimePicker] Absolute range - Clicking apply without selecting dates results in "Invalid date to Invalid date"

Open tony-zhou12 opened this issue 2 years ago • 1 comments

What package is this for?

  • [x ] React
  • [ ] Angular

Describe the bug

Selecting absolute range for DateTimePicker and then clicking apply before making any date selections results in component displaying "Invalid date to Invalid date"

To Reproduce

Steps to reproduce the behavior:

  1. Click on component
  2. Click on custom range
  3. Select absolute radio
  4. Click apply without making any date selection

Please create a reduced test case in CodeSandbox: https://codesandbox.io/s/github/carbon-design-system/carbon-addons-iot-react/tree/next/packages/react/examples/codesandbox

Expected behavior

The apply button shouldn't be clickable without making date selections

Environment/versions:

  • OS: [e.g. MacOS, Windows]
  • Browser: [e.g. chrome, safari]
  • carbon-addons-iot-react version: [e.g. v2.60.0]

Additional context

Can reproduce here https://carbon-addons-iot-react.com/?path=/story/1-watson-iot-date-time-range-selector-datetime-picker--default

Add any other context about the problem here.

Specific timeline issues / requests

Do you want this work within a specific time period? Is it related to an upcoming release?

NB: The core contributors will try to work with your timeline, but it's not guaranteed. The earlier you make a request in advance of a desired delivery date, the better!

tony-zhou12 avatar Jun 16 '22 14:06 tony-zhou12

Desired behavior would be to disable the "Apply" button until a valid selection is made

JordanWSmith15 avatar Jun 28 '22 14:06 JordanWSmith15