Skip to content
This repository was archived by the owner on Feb 16, 2026. It is now read-only.

not able update selected date range  #21

@rahulchitrapu

Description

@rahulchitrapu

if we want to update value of initial date range after api call it is not accepting the value
for example for the first time if i send {startDate: '2024-03-13', endDate: '2024-04-13'} and later if update my value to {startDate: '2024-03-13', endDate: '2024-05-13'} it is still showing selected range is this({startDate: '2024-03-13', endDate: '2024-04-13'})

you have to take new prop like selected daterange to update
or please add useEffect in to update daterange in your code with dependency array initialDateRange

useEffect(()=>{
setdaterange({...initialDateRange})
},[initialDateRange])

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions