patternfly-react icon indicating copy to clipboard operation
patternfly-react copied to clipboard

Bug - [DatePicker] - Invalid input with multiple validators

Open jschuler opened this issue 3 years ago • 0 comments

If there are multiple validators, the DatePicker text input will show the invalid icon after onBlur (click/focus out of the input). Seems to work fine with one validator, but as soon as I add another the icon pops up.

Reproducible example:

import React from 'react';
import { DatePicker } from '@patternfly/react-core';

export const DatePickerTest: React.FunctionComponent = () => {
  const rangeValidator = (date: Date) => {
    return '';
  };
  const rangeValidatorB = (date: Date) => {
    return '';
  };
  return <DatePicker value="2020-03-17" validators={[rangeValidator, rangeValidatorB]} />;
};

Screen Shot 2022-08-10 at 3 20 00 PM

jschuler avatar Aug 10 '22 19:08 jschuler