Skip to content

Styled Components does not work with DayPickerInput #1121

Discussion options

You must be logged in to vote

Hey, you can create a wrapper and replace the existing css, like this:


const WrapperStyled = styled.div`
  &&& {
    .DayPicker,
    .DayPicker-wrapper {
      :focus {
        outline: none;
      }
    }

    .DayPicker-Weekday {
      color: #6adc91;
      font-size: 18px;
      font-family: 'Montserrat-SemiBold';
    }
}
`
const Calendar = () => {
return (
<WrapperStyled>
      <DayPicker
        {...props}
        numberOfMonths={2}
        selectedDays={selectedDays}
        navbarElement={<Navbar />}
        captionElement={<Caption />}
        onDayClick={handleDayClick}
      />
    </WrapperStyled>
)
}```

Replies: 5 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by gpbl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
5 participants
Converted from issue

This discussion was converted from issue #823 on February 10, 2021 02:52.