question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Styling of the datepicker is off

See original GitHub issue

The styling of the datepicker seems to be off, i’ve tried importing the css from the dist folder directly and it didn’t work, any ideas? here’s how it looks like: https://ibb.co/gEPdep

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
sava1192commented, Feb 18, 2020

so, as mentioned above problem is in webpack.config localIdentName: [hash]. There is couple ways to fix it:

  1. Kindly ask author to use css imports 😃
  2. Update your webpack config to handle this css files classnames without hashing

As i’m only using less for css imports i’ve ended with adding smth like this to my config

{
    test: /\.css$/,
    use: ['style-loader', 'css-loader'],
},

If you still want to use .css with css imports you’ll probably need some more sophisticated test regexp to mach only css files inside node_modules/react-date-picker

1reaction
josh-stevenscommented, Aug 9, 2019

I ran into this problem as well. The css-loader is indeed the issue (our localIdentName adds a hash to all classnames). I think the library can avoid this if it imports its css like so:

import styles from 'styles.css'

And then when giving classnames to components you access them from the imported styles object:

className={styles['whatever-class']}

Rather than using raw strings for classnames. This allows CSS loader to map the classnames correctly.

Read more comments on GitHub >

github_iconTop Results From Across the Web

jquery datepicker css styling disabled dates - Stack Overflow
What I would like to do is style the disabled dates that are in the current month so they are not the same...
Read more >
How change css content from datepicker, pika-year is ...
want to change content in this class (is-disabled), but how I do it? have tried adding it in css editor, but still can't...
Read more >
Css customization in Angular Datepicker component
Learn here all about Css customization in Syncfusion Angular Datepicker component ... With this CSS class, you can override existing styles of DatePicker....
Read more >
Datepicker Widget - jQuery UI API Documentation
The datepicker widget uses the jQuery UI CSS framework to style its look and feel. If datepicker specific styling is needed, the following...
Read more >
Adding Styles to the React Date Picker - DevCamp
In this video we're going to start by styling our date picker. ... and then in .picker let's just say input and then...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found