stephy / CalendarPicker

CalendarPicker Component for React Native
787 stars 369 forks source link

Latest version breaks resetSelections() #218

Open CoinCoderBuffalo opened 3 years ago

CoinCoderBuffalo commented 3 years ago

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

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

peacechen commented 3 years ago

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

haveamission commented 1 year ago

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

peacechen commented 1 year ago

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.

Poryl commented 1 year ago

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

peacechen commented 1 year ago

Fix published in 7.1.3