Skip to content

Conversation

@milan-digiuseppe-level
Copy link

Description

Addresses this issue where invoking the handleOnPressDay(date) method doesn't update the visible month to the one that contains date.

Changes

  • updated handleOnPressDay method to set currentMonth/Year
  • updated example app to demonstrate use case

Limitations

  • I'm not sure if we always want the behaviour where invoking handleOnPressDay updates the visible month. If not, we could consider adding a boolean argument to handleOnPressDay for whether the visible month should be updated
  • there's another code path in handleOnPressDay for when range selection is enabled that I didn't address. I'm not as familiar with this feature so I didn't want to impose a product decision here
  • my fix doesn't seem to work when scrollable is set to true

Demo

Before

calendar.before.mov

After

calendar.after.mov

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant