-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Date Selection issue between december 2024 to january 2025 #2583
Comments
Could you provide a repository with a minimal reproduction of the problem? |
|
try this, @suresheprm import React, { useState, useEffect } from 'react';
import { ExpandableCalendar, CalendarProvider } from 'react-native-calendars';
const App = () => {
const [today, setToday] = useState('');
const [selectedDate, setSelectedDate] = useState('');
useEffect(() => {
const currentDate = new Date();
const formattedDate = currentDate.toISOString().split('T')[0];
setToday(formattedDate);
setSelectedDate(formattedDate);
}, []);
return (
today && (
<CalendarProvider date={selectedDate}>
<ExpandableCalendar
firstDay={1}
markedDates={{
[selectedDate]: { selected: true, marked: true, disableTouchEvent: false },
}}
theme={{
selectedDayBackgroundColor: '#00adf5',
todayTextColor: '#00adf5',
dayTextColor: '#2d4150',
textDisabledColor: '#d9e1e8',
dotColor: '#00adf5',
selectedDotColor: '#ffffff',
arrowColor: '#00adf5',
monthTextColor: '#00adf5',
}}
disableAllTouchEventsForDisabledDays={true} // Evitar interação com dias desabilitados
allowShadow={false}
/>
</CalendarProvider>
)
);
};
export default App; |
Thanks for the reply @mensonones, There is no luck after update your code. Still the error is same. Jan 01, 02, 03, 04 are disabled. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Team,
Am using expandable calendar, before 28 december 2024, date selection is working perfectly when it comes to jan 1 2025 it disabled the previous days of 29, 30, 31. Now today 5th jan 2025 it goes to next week screen now it disabled the Jan 01, 02 ,03, 04. I set my max date is current date.
Help me to fix this issue.
Am using
"react-native": "^0.73.0",
"react": "18.2.0",
"react-native-calendars": "^1.1307.0",
The text was updated successfully, but these errors were encountered: