Skip to content

Type mismatch for Datepicker props with TS: onChange vs value #1

@NoahMLoomis

Description

@NoahMLoomis

Awesome tool, just what I was looking for.

There seems to be a type mismatch. The value prop has the following type:

 value: {
        startDate: Date | string,
        endDate: Date | string,
    } | null

But the value passed in the onChange is the following:

value: {
        startDate: string | null,
        endDate: string | null
     }

So when trying to change the value you get the following error:
image
I'll create a PR for this

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