stephy / CalendarPicker

CalendarPicker Component for React Native
802 stars 371 forks source link

Background color #278

Open prabhu8511 opened 3 years ago

prabhu8511 commented 3 years ago

How can I set multiple background-color (two colors at the same time), want to achieve like as we have in the attached screenshot.

Screenshot from 2021-04-06 12-24-56

peacechen commented 3 years ago

Explore the props: https://github.com/stephy/CalendarPicker#calendarpicker-props

Especially customDatesStyles: https://github.com/stephy/CalendarPicker#calendarpicker-props

As far as I can tell, the split colors may not be possible using existing style customizations. You would need 2 Views inside each date to set 2 different background colors. If you confirm that is the case, please submit a PR to add that feature.

prabhu8511 commented 3 years ago

@peacechen could you guide on this, how can we pass a view inside a date.

peacechen commented 3 years ago

That would be an enhancement to this library. Use the sample application to aid in development on the code in this library: https://github.com/stephy/CalendarPicker#sample-application

I recommend adding a new key to customDatesStyles that allows the user to pass in a View (or any other component) to house the contents of the date.