New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-enable handleDayClick for disabled dates #789

Closed
dewey92 opened this Issue Sep 10, 2018 · 3 comments

Comments

2 participants
@dewey92
Contributor

dewey92 commented Sep 10, 2018

Hi, thanks for this great library beforehand, I really appreciate your work!

However, there's an issue I'd like to address to you regarding this commit (808da17#diff-e15d85e29b8c7310cbf7799c62521619) which basically ignores this.props.onDayClick when the selected date is disabled. In the application I'm developing, I really want to show a message explaining why a particular date is disabled (i.e we don't deliver the product on Sunday, etc) so the end-user can clearly know the reason.

Previously this worked:

onDayClick = (date: Date, modifiers: DayModifiers) => {
  if (modifiers.disabled) {
    // If user clicks Sunday,
    this.setState({ errMessage: 'No Sunday delivery' });
    // If user clicks 25 Dec
    this.setState({ errMessage: 'No Chrismast delivery' });
    // ...etc

    return;
  }

  this.setState({ errMessage: '' });
};

But now it doesn't. So, is there any other way to achieve this?

@gpbl

This comment has been minimized.

Show comment
Hide comment
@gpbl

gpbl Sep 10, 2018

Owner

Yes you are right! That shouldn't have been merged, my bad. Could you revert it? I will do it in the next days otherwise. Thanks!

Owner

gpbl commented Sep 10, 2018

Yes you are right! That shouldn't have been merged, my bad. Could you revert it? I will do it in the next days otherwise. Thanks!

@dewey92

This comment has been minimized.

Show comment
Hide comment
@dewey92

dewey92 Sep 12, 2018

Contributor

@gpbl should we close this issue?

Contributor

dewey92 commented Sep 12, 2018

@gpbl should we close this issue?

@gpbl

This comment has been minimized.

Show comment
Hide comment
@gpbl

gpbl Sep 13, 2018

Owner

Sure! FIx published in v7.2.4.

Owner

gpbl commented Sep 13, 2018

Sure! FIx published in v7.2.4.

@gpbl gpbl closed this Sep 13, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment