-
-
Notifications
You must be signed in to change notification settings - Fork 97
Description
In Android Phone not able to see the defaultStyles
Working code
`/* eslint-disable react-native/no-inline-styles */
import DateTimePicker, {useDefaultStyles} from 'react-native-ui-datepicker';
return (
<View
style={{
paddingVertical: 10,
marginBottom: 0,
paddingBottom: 0,
}}>
<DateTimePicker
mode="single"
date={selectedDate}
selected={selectedDate}
today={presentDay}
onChange={({date}) => {
setSelectedDate(moment(date));
}}
styles={{
...defaultStyles,
today: {borderColor: theme.colors.primary, borderWidth: 1}, // Add a border to today's date
selected: {
color: theme.colors.white,
backgroundColor: theme.colors.primary,
},
selected_label: {color: theme.colors.white}, //Text style
selected_year: {
backgroundColor: theme.colors.primary,
},
selected_month: {backgroundColor: theme.colors.primary},
day_label: {color: theme.colors.textPrimary},
month_label: {color: theme.colors.textPrimary},
year_label: {color: theme.colors.textPrimary},
weekday_label: {color: theme.colors.textPrimary},
// year_selector_label: {
// color: theme.colors.textPrimary,
// fontSize: 16,
// },
}}
minDate={minDate}
maxDate={finalMaxDate}
weekdaysFormat="min"
style={{
padding: 0,
paddingBottom: 0,
marginBottom: 0,
margin: 0,
}}
containerHeight={305}
/>
);
};
export default DatePicker;
`