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

Use with velocity-react

Open btmdave opened this issue 5 years ago • 1 comments

We're using velocity-react to slideIn the picker, but using this seems to cause an issue with the calculation of input sizes. For example, here's our usage:

        <VelocityTransitionGroup
          enter={{
            animation: 'slideDown',
            duration: 250
          }}
          leave={{
            animation: 'slideUp',
            duration: 250
          }}
        >
          {showDate ? (
            <Wrapper>
                <DateTimePicker
                  onChange={this.onDateChange}
                  date={date}
                />
            </Wrapper>
          ) : (
            undefined
          )}
        </VelocityTransitionGroup>

Without velocity, the input year for example shows correct (2019) however, when used with velocity it only shows 2 and I can see the value is applied correctly to the input, it's just not sizing correctly, until you then open the calendar again. I guess my question is any idea why this could effect the resizing or if there's a way to manually force it?

btmdave avatar Jan 04 '19 20:01 btmdave

Hi, there's not much unusual stuff going on regarding the inputs, with one exception being the method which updates the input width. This method appends the element for measurement purposes to input's parent element, so perhaps there's something going wrong with it, like the element gets squashed? If that's the case, I could probably fix it by applying position: fixed before measuring all the stuff, but I really don't know 🤔

wojtekmaj avatar Jan 20 '19 18:01 wojtekmaj

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 Jan 23 '23 00:01 github-actions[bot]

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

github-actions[bot] avatar Feb 06 '23 00:02 github-actions[bot]