Search code examples
reactjsreact-dates

How to CSS styling with react-dates?


I'm using a react-dates package of Airbnb, but I can't styling CSS for it. So, if you used it, please help me. How to styling CSS for react-dates?

enter image description here "actual"

I expect the date picker will be

enter image description here


Solution

  • react-dates relies on moment to format date. If what you need is just show a complete date, you need to format your date using the displayFormat prop, like this example:

     static defaultProps = {
        Wrapper: styles.Wrapper,
        displayFormat: 'MMM DD YYYY',
        invalid: false,
        disabled: false,
      };