OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

react-datepicker anchorDirection="bottom" not working

  • Thread starter Thread starter Alpharis
  • Start date Start date
A

Alpharis

Guest
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 :

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"
/>

Problem screenshot

<p>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.</p>
<p>code :</p>
<pre><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"
/>
</code></pre>
<p><a href="https://i.sstatic.net/oagWhSA4.png" rel="nofollow noreferrer">Problem screenshot</a></p>
 

Latest posts

Top