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

Override customDate style when it is highlighted(selected) #95

Closed
jfrense opened this issue Apr 20, 2018 · 7 comments
Closed

Override customDate style when it is highlighted(selected) #95

jfrense opened this issue Apr 20, 2018 · 7 comments

Comments

@jfrense
Copy link

jfrense commented Apr 20, 2018

I am marking other days with a different style if I have an event for that day already scheduled. However when a User selects that day I still want the border that occurs when a date is selected. If I add a border to my customDate style then two dates have a border around them which I dont want to happen.

Is there a way for the highlighted style to override the custom date style when selected ? Or amybe merge the two styles with custom style + selected style?

@peacechen
Copy link
Collaborator

That would be a good feature to have. Would you be willing to submit a PR?

@peacechen
Copy link
Collaborator

On reviewing the code and from my experience, the selected date style should override the custom style. Have you tried setting borderWidth 0 for the selected date style?

@jfrense
Copy link
Author

jfrense commented Apr 23, 2018

I jus tried your suggestion and it doesn't seem to be the case. For every date that I apply a customDateStyle too, when I select it and I have a different select style, the select style does not override the customDateStyle.

@peacechen
Copy link
Collaborator

Looks like the logic will need to be updated to prioritize the selected style. Would you like to test it? You'd need to point your package.json to this repo.

@peacechen
Copy link
Collaborator

@jfrense Code is on master if you'd like to try it out

@jfrense
Copy link
Author

jfrense commented Apr 26, 2018

@peacechen thanks for the fix. One issue I noticed is that the following components don't have any effect anymore

dateNumberStyle={{color: 'red'}}
dateNameStyle={{color: 'red'}}

for dates where the customDateStyle does not apply.

@peacechen
Copy link
Collaborator

Would you mind posting your <CalendarStrip/> code along with the props? I think I see an issue and want to test it out before pushing another commit.

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

2 participants