react-datetime-picker icon indicating copy to clipboard operation
react-datetime-picker copied to clipboard

Add className variable for input wrapper

Open kennedybaird opened this issue 5 years ago • 3 comments

So, I just spent some time trying to get this looking nice in my project.

screenshot_20181112_174310

All I needed to do was be able to apply a class to the outer wrapper et voila:

screenshot_20181112_174240

Have you thought about adding this as an option? It seems like a no-brainer with regards to compatibility.

kennedybaird avatar Nov 12 '18 04:11 kennedybaird

Hi, DateTimePicker already accepts className prop.

wojtekmaj avatar Nov 12 '18 10:11 wojtekmaj

I'm suggesting an additional className prop, called wrapperClassName.

This would go at lines 168 & 174 of DateTimePicker.jsx as so:

renderInputs() {
    const {
      calendarIcon,
      clearIcon,
      disabled,
      locale,
      maxDetail,
      maxDate,
      minDate,
      name,
      required,
      showLeadingZeros,
      value,
      wrapperClassName,
    } = this.props;

    const { isCalendarOpen, isClockOpen } = this.state;

    return (
      <div className={`${baseClassName}__wrapper ${wrapperClassName}`}>

ghost avatar Nov 18 '18 20:11 ghost

I'm also very interested in this kind of feature.

lcsixp avatar Dec 19 '19 18:12 lcsixp

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this issue will be closed in 14 days.

github-actions[bot] avatar Feb 13 '23 01:02 github-actions[bot]

This issue was closed because it has been stalled for 14 days with no activity.

github-actions[bot] avatar Feb 27 '23 01:02 github-actions[bot]