stephy / CalendarPicker

CalendarPicker Component for React Native
807 stars 372 forks source link

Added renderDay #375

Open andrewmcd1 opened 7 months ago

andrewmcd1 commented 7 months ago

This PR introduces a new prop, renderDay, to enhance the customization capabilities of react-native-calendar-picker. With this addition, users can now provide a custom component to render each day in the calendar according to their specific requirements.

Changes Introduced:

Why is this change necessary? The ability to customize the rendering of individual days in the calendar is a highly requested feature from our user community. By introducing the renderDay prop, we empower users to tailor the calendar's appearance and behavior to suit their unique application needs.

How to Use: To utilize the new renderDay prop:

  1. Import the react-native-calendar-picker component.
  2. Pass a custom component to the renderDay prop, specifying how each day should be rendered.
  3. Customize the rendering logic within the provided component to achieve the desired visual appearance and functionality.

This enhancement enriches the versatility of react-native-calendar-picker, empowering developers to create more tailored and engaging calendar experiences within their React Native applications.

white-room commented 5 months ago

any chance someone has had time to take a look at this?

white-room commented 3 months ago

@peacechen any chance you could take a look?

peacechen commented 3 months ago

Thanks @white-room for contributing this feature. Added a few comments. Please also resolve the conflicts in this PR.

peacechen commented 3 months ago

Thanks @andrewmcd1 for making those changes. I missed the Readme documenting the renderDay prop. The date param has changed.

peacechen commented 3 months ago

@andrewmcd1 A number of other PRs have recently been merged and a release needs to be done soon. Can you take a look at my comments? Please test this in the sample app too.