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

Pass onClearClick to custom input component?

Open ziweiwu opened this issue 8 years ago • 3 comments

Is there a way to pass onClearClick function to the customInput component I am using? Because there is a clear button included in the TextField.

I am trying like this, but it's not working.

<DatePicker>
 customInput={<TextField
      label={props.label}
      showClearButton = {props.isClearable}
      onClearButtonClick = {props.onClearClick}
      placeholderText={props.placeholderText}
    />}

</>

ziweiwu avatar Jun 08 '18 13:06 ziweiwu

Any update on this. This seems to be a bug. At least we can pass hideClearButton. There is also no way to call onClearClick from component which is rendering Datepicker as onClearClick is a private instance method.

sahaam avatar May 30 '19 08:05 sahaam

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Nov 26 '19 09:11 stale[bot]

Bump

zargold avatar Jun 07 '21 17:06 zargold