ref on date picker popup
Is it possible to add ref as prop? If not, how can I possibly get the dimension and positions of the date picker popup? The element .rdtPicker height, width, top, left, bottom, right positioning? I can't use getBoundingClientRect() as well. I tried to get the element onFocus but the dimensions only return 0.
If you have a ref for the react-datetime component, you should be able to call .getElementsByClassName(".rdtPicker") to get the DOM element for the popup.
@rikkit you mean like this?
<Datetime value={date}
ref={this.onDatePickerMount}
dateFormat="MMM DD YYYY"
timeFormat={false}
closeOnSelect={true}
renderDay={this.renderDay}
onChange={this.onSelectDate}
onFocus={this.onFocus}
onBlur={this.onBlur}
inputProps={{placeholder: dateRange, onKeyPress: this.onKeyPress}}
isValidDate={this.isValid} />
It doesn't return anything aside from the parseDate object. Also when I use getElementsByClassName(".rdtPicker") it only returns 0 on each dimensions, it doesn't return the actual value like the height and width.