CalendarPicker icon indicating copy to clipboard operation
CalendarPicker copied to clipboard

Latest version breaks resetSelections()

Open CoinCoderBuffalo opened this issue 5 years ago • 5 comments

This works on v6.1.1. refCal.current.resetSelections()

This does nothing on v7 refCal.current.resetSelections()

CoinCoderBuffalo avatar Jul 25 '20 10:07 CoinCoderBuffalo

Please post a code snippet and more details about the unexpected behavior. Are you using scrollable?

peacechen avatar Jul 25 '20 15:07 peacechen

Can confirm, same bug.

Literally just including a ref and then trying to call the ref like so:

  const clearDates = () => {
    setStartDate(null);
    setEndDate(null);
    r.current?.resetSelections();
  };

doesn't work

haveamission avatar Nov 15 '22 05:11 haveamission

Thanks for the code snippet. I'm not able to actively work on this project and am looking for maintainers to help. Please submit a PR and I'll review & merge. Try the Sample App to develop & test locally.

peacechen avatar Nov 15 '22 17:11 peacechen

Hi @peacechen , I see the PR fix for this. Could you review it and merge? https://github.com/stephy/CalendarPicker/pull/299/files

Poryl avatar Nov 23 '22 03:11 Poryl

Fix published in 7.1.3

peacechen avatar Nov 29 '22 18:11 peacechen