stephy / CalendarPicker

CalendarPicker Component for React Native
787 stars 369 forks source link

Can't change weekdays 's text style and month title's text style. #208

Open hieulike opened 4 years ago

hieulike commented 4 years ago

When i implement calendar picker, i can't change weekdays 's text style and month title's text style. Please check it, help me. Thanks.

peacechen commented 4 years ago

Please post a Snack or a reproducible code snippet. The example folder has a sample app that you can test your code with.

6.1.5 added customDayHeaderStyles to style the day names header. Code example: https://github.com/stephy/CalendarPicker#styling-each-day-of-the-week-and-the-day-name-header

Note that dayOfWeekStyles and customDatesStylesPriority are deprecated and will be removed in the next version.

There isn't a style prop that targets only the month name in the header. If you'd like to add that feature, please submit a PR and I'll review promptly. I recommend adding separate text style props for the month and year.

truongtv commented 3 years ago

@hieulike you can custom weekdays text style like this: <CalendarPicker ... customDayHeaderStyles={() => { return { textStyle: { color: 'red', } } }} ... />