Why these changes?
I added a new function onDateSelected to handle previous and next date selection events in the calendar. It is important to know if component has a new period to select.
My context:
I will make request to the server and when it returns, I want to disable some dates but the component does not provided a function to inform what the period is showing.
How do we test?
Navigate to the calendar component, put onDateSelected={onDateSelected} in component.
Interact with the calendar and click on previous or next buttons.
Observe if the onDateSelected function is triggered appropriately.
I do not create test because the function onDayClick not have one. And I had need to some example to do it.
✨ New feature
Why these changes? I added a new function
onDateSelected
to handle previous and next date selection events in the calendar. It is important to know if component has a new period to select. My context: I will make request to the server and when it returns, I want to disable some dates but the component does not provided a function to inform what the period is showing.How do we test?
onDateSelected={onDateSelected}
in component.onDateSelected
function is triggered appropriately.