Skip to content

Expose onBlur prop #122

@srph

Description

@srph

<DayPicker onBlur={} />

I have a use-case for there where the DayPicker appears as a popover.

ATM, I show/hide the datepicker through a state (active when the input is focused; inactive on blur). However, clicking the DayPicker div changes the focus from the input to the DayPicker.

I have no means of checking if the user has focused away from the DayPicker.

  • If there's blur, there's usually focus, but I'm not sure if there's any relevance.
  • Or we could just use the spread operator so all other props are accepted (<DayPicker onDayClick={...} {...other} />).

I'm willing to send a PR, just need some approval first.

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