wix / react-native-calendars

React Native Calendar Components 🗓️ 📆
MIT License
9.33k stars 2.9k forks source link

[Bug] The current day on the calendar has the wrong style and display. #2098

Closed akakaze closed 1 year ago

akakaze commented 1 year ago

Description

1-2 sentences describing the problem you're having or the feature you'd like to request. The current day on the calendar has the wrong style and display.

Expected Behavior

What action did you perform, and what did you expect to happen? I used the agenda and expected: only "today" has the selected style in the first implementation. When I select another date, "Today" has today style.

Observed Behavior

What actually happened when you performed the above actions? Attached picture, here we take 2022-11-18 as today. At the time of initial execution, the 18th of every month has a selected style. When I choose 2022-11-16, the 18th of every month still has the selected style.

Environment

Please run these commands in the project folder and fill in their results:

Reproducible Demo

Please provide a minimized reproducible demonstration of the problem you're reporting. Issues that come with minimal repro's are resolved much more quickly than issues where a maintainer has to reproduce themselves. Using out-of-the-box Agenda

Screenshots

Screenshots or gifs of the issue and the suggested fix will help us move faster with the review process. Screenshot_20221118-154856035 png

jerry791 commented 1 year ago

i also have the same issue......

jerry791 commented 1 year ago

i also have the same issue......

I found that I add {{ date : '' }} in calendar and it works

akakaze commented 1 year ago

i also have the same issue......

I found that I add {{ date : '' }} in calendar and it works

@jerry791 Thanks for your reply, but it still doesn't solve my problem, could you please describe your solution in more detail?

versusvoid commented 1 year ago

Seems to be introduced in https://github.com/wix/react-native-calendars/blob/8d4f36b840bc482f318ac2ca4be1a710bbaaac0f/src/day-state-manager.ts#L9

akakaze commented 1 year ago

I found that #2091 describes the problem I encountered, so following this approach can solve it.

SpaceSimon commented 1 year ago

I recently updated the lib.

Before the update, today was coloured in blue, and the current selected day was in a blue circle, both on Calendar and Agenda components. That was nice.

After the update:

The context={{date: ''}} hack works on Calendar but not on Agenda.

I downgraded to 1.1289.0 (8 Sept 2022) which seems to be the last not broken version for this (tested on Android only).

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.