-
Notifications
You must be signed in to change notification settings - Fork 13
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
selectedByDefault not working with functional components #14
Comments
hi @naimgarzuzi sorry for the delay, could you please share a piece of code to reproduce this |
Hi @roggervalf , Thanks in advance. import { DatePickerCalendar } from 'react-nice-dates' function AppointmentsComp() { const [lodaing, setLoading] = useState(false); const modifiers = { const postContext = useContext(AppointmentContext) useEffect(() => { // useEffect(() => { async function addAppointmentCallbackContinuousCase({
}; async function removeAppointmentCallbackContinuousCase( }; return ( export default AppointmentsComp; |
@naimgarzuzi, could you please set it in https://codesandbox.io/, would be easier to take a look |
@roggervalf , you have edit permission |
Nice, I was playing around and it works when dates is not set by setDays, if you just declare the dates variables and just pass it into the react-appointment-picker, it should work |
I know that changing variable must be with use state, So I declared the setDays for changing the value of the days Could you please change it in the sandbox to make it work? Thanks in advance. |
Hi,
I'm facing issue with selectedByDefault when using functional components.
I'm fetching the data using useContext hook, and setting days prop with useEffect, The isSelected dosen't affected in picker.
The isReserved works fine.
The text was updated successfully, but these errors were encountered: