-
Notifications
You must be signed in to change notification settings - Fork 369
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
Calendar picker doesn't show dates changes #376
Comments
the same problem for 8.0.1/8.0.2 version. |
8.x replaced Moment with Date-fns. Those changes may have inadvertently broken existing behavior. Try using this as a controlled component, passing in the
Depending on how the |
I'm currently facing the same issue. Setting |
@tranjog Do you have any insight into this? |
Sorry about the slow reply @peacechen and @crazydeveloper09 . I think I got to the bottom of it. Please check my PR here: PR: 381 PS: You will need to add the |
Thanks @tranjog for debugging and fixing this! PR is merged. Please publish at your convenience. |
Thanks for merging @peacechen! |
I am using this library in my app and I have a weird problem. The date in the state updates onDateChange, but the calendar doesn't show it in the view. I need to go to next month, then back and it shows the last chosen date as active. All the code is on Snack
But for first look I am going to post the co here
`import React, { useState } from "react";
import { View, Text, StyleSheet } from "react-native";
import CalendarPicker from 'react-native-calendar-picker';
const CalendarScreen: React.FC = () => {
const [selectedStartDate, setSelectedStartDate] = useState(new Date());
const startDate = selectedStartDate ? selectedStartDate.toLocaleDateString() : '';
}
const styles = StyleSheet.create({
container: {
padding: 15,
justifyContent: 'center',
alignItems: 'center'
}
})
export default CalendarScreen;`
The text was updated successfully, but these errors were encountered: