react-datetime-picker
react-datetime-picker copied to clipboard
Use with velocity-react
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?
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 🤔
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.
This issue was closed because it has been stalled for 14 days with no activity.