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

colour of Selection #227

Open
mhusnainnnaseer786 opened this issue Nov 28, 2019 · 6 comments
Open

colour of Selection #227

mhusnainnnaseer786 opened this issue Nov 28, 2019 · 6 comments

Comments

@mhusnainnnaseer786
Copy link

How can I change the colour of selection?
Screenshot from 2019-11-28 18-32-12

@avivek
Copy link

avivek commented Nov 30, 2019

I am also looking for some direction on how to modify the CSS styles.

@jufemaiz
Copy link

jufemaiz commented Dec 3, 2019

The colours are not extracted into scss variables (ref: https://github.com/onefinestay/react-daterange-picker/blob/master/src/css/react-calendar.scss) so that makes it a little challenging.

@ts-ankit
Copy link

ts-ankit commented Mar 2, 2020

any success here ?

@piyush97
Copy link

Any updates??

@RowanBurns01
Copy link

Has anyone found a solution to this issue? Thanks, Rowan

@arispriyatna95
Copy link

i found the solution.

i modified style for dark mode.

this is result:
image

use @emotion/styled

component DateRangePicker wrapped by div, div modified with styled from emotion and find css of date range for restyle the UI.

example restyle

const ContainerDateRangePicker = styled('div')(({ theme }) => ({

    '& .DateRangePicker__MonthHeader' : {
        ...theme.applyStyles('dark', {
            color: '#FFF',
        }),
    },
    '& .DateRangePicker__WeekdayHeading abbr[title]' : {
        ...theme.applyStyles('dark', {
            color: '#FFF',
        }),
    },
    '& .DateRangePicker__Date--weekend' : {
        ...theme.applyStyles('dark', {
            background: "#221e1e",
        }),
    },
    '& .DateRangePicker__MonthDates' : {
        ...theme.applyStyles('dark', {
            color: '#FFF',
        }),
    },
    '& .DateRangePicker__CalendarSelection' : {
        ...theme.applyStyles('dark', {
            background: '#000',
            border : "1px solid #000"
        }),
    }
}));

and this DateRangePicker wrapped by div

<ContainerDateRangePicker>
    <DateRangePicker
        value={date}
        onSelect={onSelect}
        numberOfCalendars={2}
    />
</ContainerDateRangePicker>

hope it can help you

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

7 participants