Skip to content

Wrong/confusing focus the "to" input field comment in example #986

@jnachtigall

Description

@jnachtigall

I am new to react-day-picker, sorry, if this is the wrong place to report. Could not find any other place.

On http://react-day-picker.js.org/examples/input-from-to there is:

  handleFromChange(from) {
    // Change the from date and focus the "to" input field
    this.setState({ from });
  }

The and focus the "to" input field comment imho makes no sense here. There's no focus being set here.

The next function does something like setting the from's month (but still not focus):

  handleToChange(to) {
    this.setState({ to }, this.showFromMonth);
  }

This confused me. (And I could not find the source for it to try to improve.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    PR WelcomeWelcome to Pull RequestdocsDocumentation only changesgood first issueGood for newcomerslowThis issue has a low priorityv7

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions