I am using react-datepicker to display a time picker component but I want the time list to be displayed in the bottom of input component but it’s currently showing on top of the input field.
code :
<DatePicker
selected={end_time}
onChange={(date) => {
setEndtime(date);
}}
showTimeSelect
showTimeSelectOnly
timeIntervals={30}
timeCaption="Time"
dateFormat="h:mm aa"
minTime={moment().toDate()}
maxTime={moment().endOf("day").toDate()}
anchorDirection="bottom"
/>
2
Answers
Found a workaround
You need to use the
popperPlacement="bottom"
So, it will be
these are it’s parameters that you can play with
Hope this help