Hacker0x01 / react-datepicker

A simple and reusable datepicker component for React
https://reactdatepicker.com/
MIT License
7.92k stars 2.23k forks source link

Strange display issue #3205

Closed ghost closed 6 days ago

ghost commented 2 years ago

After installing react-datepicker, the datepicker is displaying like this.

I am using React 16.13.1 in Chrome.

This is my code.

<DatePicker selected={this.state.object["StartDate"].value} dateFormat="MMMM d, yyyy" />

2021-09-21_17-18-04

victormimo commented 2 years ago

Don't forget to add --> import "react-datepicker/dist/react-datepicker.css"; right under --> import ReactPicker..

Hope it helps!

dbledayr commented 2 years ago

Having similar issues within a GatsbyJS project.

Running build has same issues as above while running develop etc. locally works fine. Have trouble shot numerous reasons, but able to replicate consistently with running yarn build & yarn serve (e.g. gatsby build & gatsby serve) locally.

summea commented 2 years ago

I saw this same CSS related formatting issue on a project.

Something that worked for me was to replace this older import line: import 'react-datepicker/dist/react-datepicker-cssmodules.css';

With this line from the documentation: import 'react-datepicker/dist/react-datepicker.css';

I hope that helps!

github-actions[bot] commented 2 weeks ago

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 10 days.

github-actions[bot] commented 6 days ago

This issue was closed because it has been stalled for 10 days with no activity.