26 lines
849 B
TypeScript
26 lines
849 B
TypeScript
import React from 'react';
|
|
import DateTimePicker, { useDefaultStyles } from 'react-native-ui-datepicker';
|
|
import { ChevronLeft, ChevronRight } from 'lucide-react-native';
|
|
|
|
type AppDatePickerProps = React.ComponentProps<typeof DateTimePicker>;
|
|
|
|
export const AppDatePicker = (props: AppDatePickerProps) => {
|
|
const defaultStyles = useDefaultStyles('light');
|
|
|
|
return (
|
|
<DateTimePicker
|
|
{...props}
|
|
locale="it"
|
|
components={{
|
|
IconPrev: <ChevronLeft size={24} color="#1f2937" />,
|
|
IconNext: <ChevronRight size={24} color="#1f2937" />,
|
|
...props.components,
|
|
}}
|
|
styles={{
|
|
...defaultStyles,
|
|
selected: { backgroundColor: '#099499' },
|
|
...props.styles,
|
|
}}
|
|
/>
|
|
);
|
|
}; |