CalendarPicker icon indicating copy to clipboard operation
CalendarPicker copied to clipboard

Added renderDay

Open andrewmcd1 opened this issue 1 year ago • 6 comments

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:

  • Added a new prop named renderDay.
  • This prop allows users to specify a custom component for rendering each day.
  • Provides greater flexibility in styling and functionality customization for calendar components.
  • Includes documentation updates to reflect the new prop and its usage.

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.

andrewmcd1 avatar Apr 18 '24 19:04 andrewmcd1

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

white-room avatar May 28 '24 20:05 white-room

@peacechen any chance you could take a look?

white-room avatar Aug 01 '24 16:08 white-room

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

peacechen avatar Aug 02 '24 16:08 peacechen

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

peacechen avatar Aug 05 '24 03:08 peacechen

@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.

peacechen avatar Aug 09 '24 02:08 peacechen