Positioning of react-date-picker
See original GitHub issueHi,
I am using this library and like it for it’s simplicity and easy to use features. And now am stuck at one point. Check the image attached date picker
As you can see the top part is hidden behind my menu bar.
How can I position it to open somewhere else or modify the css myself to adjust it’s position.
I have made a reusable component using this date picker, code is below:
import React from 'react';
import DatePicker from 'react-date-picker';
const CustomDatePicker = ({dtVal, handleChange}) => {
return (
<>
<DatePicker
onChange={handleChange}
value={dtVal}
clearIcon={null}
format="dd/MM/yyyy"
className="mr-2"
/>
</>
);
};
export default CustomDatePicker;
And it is being used like this:
<LabelContainer className="mr-2"> Visited On:</LabelContainer>
<CustomDatePicker
calendarClassName="calender-custom-position"
className="ml-4"
dtVal={visitDate}
handleChange={onDateChange}
/>
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
I want to change the position of the calendar · Issue #1246
The calendar is hidden on the smartphone. Can you adjust the position? ... The react-datepicker library uses react-popper found here:.
Read more >I'm having trouble with react-datepicker position
@emi yes, I've tried that but the className for the datepicker, which is .react-datepicker-popper does not apply the z-index property.
Read more >React Suite DatePicker Usage Placement
The placement prop of the React Suite DatePicker component defines the position of the DatePicker. It takes these values – 'bottomStart', ' ...
Read more >React Datepicker crafted by HackerOne
A simple and reusable datepicker component for React. Installation. The package can be installed via NPM: npm install react-datepicker --save. Or by using...
Read more >react-datepicker float position - Code Examples & ...
react -datepicker float position ... Have the same issue. Want to move it left depends on input position. Someone know how to do...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I agree had to add
so Date Picker always shows under input
Try to give it
position: fixed;