Use the components prop to replace default calendar elements with your own custom components. This allows for deep UI customization of days, months, years, and more.
To implement this, create a CalendarComponents object containing your custom components and pass it to the DateTimePicker.
import DateTimePicker, {
CalendarDay,
CalendarMonth,
CalendarComponents,
} from 'react-native-ui-datepicker';
const components: CalendarComponents = {
Day: (day: CalendarDay) => <YourCustomDay day={day} />,
Month: (month: CalendarMonth) => <YourCustomMonth month={month} />
// etc
};
export function Calendar() {
return (
<DateTimePicker
components={components}
/>
);
}