Skip to content

Add onCalendarChange to CWMSForm #182

@krowvin

Description

@krowvin

I am creating a report page that allows users to select previous and future timestamps with the calendar dropdown. When they select a day in the past all the values (that I have queried myself), including the form values, should update to that timestamp.

Need to be able to re-query other datapoints in my page when the calendar changes using that timestamp the calendar provides.

One approach might be to expose a

onCalendarChange that provides an object with the calendar's timestamp that can be used as a query key or query param for CDA calls.

Alternatives

Could possibly yank the timestamp out of the context like this?

const { baseTimestamp } = useContext(FormContext);

But might not be obvious as an option for other users that wish to handle this onChange event.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions