stephy / CalendarPicker

CalendarPicker Component for React Native
787 stars 369 forks source link

how change title header month #324

Open azcodia opened 2 years ago

azcodia commented 2 years ago

how to change the text in this yellow circle https://i.pinimg.com/originals/7b/65/0f/7b650f8d7689de7b821e1135412fb0fe.jpg

sipotat commented 1 year ago

monthTitleStyle and yearTitleStyle

maxbethke commented 7 months ago

You can use the months prop to provide translations for the months. See the Props section of the readme

If you use moment.js with a locale set, you can use it so 'autogenerate translations' like this:

<CalendarPicker
  weekdays={[...Array(7).keys()].map(i => moment().weekday(i).format('dd'))}
  months={[...Array(12).keys()].map(i => moment().month(i).format('MMM'))}
/>

Same will work with weekdays.

image

Consult the moment.js docs on how to use the .format() method on moment