Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Component not seen after adding css #63

Open
athuldom opened this issue Dec 8, 2020 · 7 comments
Open

Component not seen after adding css #63

athuldom opened this issue Dec 8, 2020 · 7 comments

Comments

@athuldom
Copy link

athuldom commented Dec 8, 2020

before importing css the component was like below
u303

After adding the css nothing is displayed in the place
my import statement
u304
some method
u305
added the component
u306

please provide a clear code document and code demo example so that i can use it properly

@ikkiwar
Copy link

ikkiwar commented Dec 23, 2020

i have the same problem, did you manage to solve that bug?

@nickeljew
Copy link
Owner

nickeljew commented Dec 23, 2020 via email

@Bronzdragon
Copy link

Import the CSS like such instead:

import 'react-month-picker/css/month-picker.css'

@ikkiwar
Copy link

ikkiwar commented Dec 29, 2020

when I import the css the component disappears, in version 1.3.10 of the component it helped me to put show = true and so the calendar appeared but this does not seem to work with version 2.0.0 onwards

@nickeljew
Copy link
Owner

Hey, guys. If you are using the implementation of importing css in JS, please import the scss instead. It's easy to add
sass-loader into your webpeck config to support the importing scss in JS.

@pedro-mass
Copy link

Loading the scss didn't change the component not showing up...

import Picker from "react-month-picker";
import "react-month-picker/scss/month-picker.scss";

export default function App() {
  return (
    <Picker
      show={true}
      years={{ min: 2013 }}
      value={{
        from: { year: 2020, month: 1 },
        to: { year: 2020, month: 12 }
      }}
      lang={{ from: "from", to: "to" }}
      theme="light"
    />
  );
}

@pedro-mass
Copy link

This comment helped: #57 (comment)

You need to handle it through a ref now: https://codesandbox.io/s/react-month-picker-z4s1w?file=/src/App.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants