react-datepicker icon indicating copy to clipboard operation
react-datepicker copied to clipboard

CSS Not Loading - Redux Hot Example

Open yomolify opened this issue 11 years ago • 10 comments

Trying to integrate this beautiful datepicker into this very popular React-Redux boilerplate https://github.com/erikras/react-redux-universal-hot-example. The input box appears and it is possible to select dates but the styling does not load at all. I have tried the canusedom approach from https://github.com/Hacker0x01/react-datepicker/issues/137 but the most it does is not give the "document is not defined" error. Screenshot is attached to show the kind of component that gets rendered. screen shot 2015-09-28 at 12 03 42 am Clicking on any of the numbers does select the right date, but the nicely styled date selector component is not rendered. Is there a way to make this render as it is supposed to?

yomolify avatar Sep 28 '15 07:09 yomolify

+1

eversadia avatar Oct 28 '15 11:10 eversadia

Seeing the same issue. Using React 0.14.0 and 0.15.1 of the datepicker.

jasongonzales23 avatar Oct 29 '15 20:10 jasongonzales23

Oh holy wow. Here's the fix. Add this:

require('react-datepicker/dist/react-datepicker.css')

Why is this not in the documentation!!!

jasongonzales23 avatar Oct 29 '15 21:10 jasongonzales23

Oh that might be an oversight from our side! Sorry about that.. Would be awesome if someone could contribute to the documentation with their experiences. On do 29 okt. 2015 at 22:05 Jason [email protected] wrote:

Oh holy wow. Here's the fix. Add this:

require('react-datepicker/dist/react-datepicker.css')

Why is this not in the documentation!!!

— Reply to this email directly or view it on GitHub https://github.com/Hacker0x01/react-datepicker/issues/194#issuecomment-152326521 .

martijnrusschen avatar Oct 29 '15 21:10 martijnrusschen

Happy to add to the docs, will squeeze it in here in a sec, but now noticing another bug. The datepicker stays display: none right now. I can manipulate in the dev console and then it works until page refresh.

Will create a new issue for this.

jasongonzales23 avatar Oct 29 '15 21:10 jasongonzales23

Thanks!

martijnrusschen avatar Nov 08 '15 11:11 martijnrusschen

Even with importing the CSS the datepicker has the same issue for me :disappointed: Playing around with it

ctrlaltdylan avatar Feb 02 '17 21:02 ctrlaltdylan

any solution for this yets?

yasserzubair avatar Oct 02 '17 12:10 yasserzubair

If anyone is using CSS Modules, you have to import react-datepicker/src/stylesheets/datepicker-cssmodules.scss

stphnlngdncoding avatar Nov 13 '17 16:11 stphnlngdncoding

I'm using CSS Modules I import react-datepicker/src/stylesheets/datepicker-cssmodules.scss not helping :(

yoavgecht avatar Apr 09 '18 16:04 yoavgecht