Skip to content
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

Fix date number not centered vertically #2207

Merged
merged 1 commit into from
May 21, 2023

Conversation

haeniya
Copy link
Contributor

@haeniya haeniya commented Apr 7, 2023

When using a custom font, the date number of the selected date in the standard calendar is not vertically centered.

calendar_before

calendar_after

Same thing was already done for the "period" styling in a different PR, see: #2026

@Inbal-Tish Inbal-Tish merged commit a5512d6 into wix:master May 21, 2023
Inbal-Tish added a commit that referenced this pull request May 21, 2023
@Inbal-Tish
Copy link
Collaborator

Inbal-Tish commented May 21, 2023

@haeniya Hi. Sorry, but I had to reverse this commit. Please see ExpandableCalendar screen with your code and without it:

Simulator Screen Shot - iPhone 13 - 2023-05-21 at 13 12 35
Simulator Screen Shot - iPhone 13 - 2023-05-21 at 13 12 50

Inbal-Tish added a commit that referenced this pull request May 21, 2023
@haeniya
Copy link
Contributor Author

haeniya commented May 21, 2023

@Inbal-Tish thanks for checking, I wasn't aware of that, sorry. Any idea how we could fix the issue with the not centered date in the standard calendar? I see that there's a separate file for the expandable calendar styling: https://github.com/wix/react-native-calendars/blob/master/src/expandableCalendar/style.ts. Maybe we can tweak something there to fix both?

@Inbal-Tish
Copy link
Collaborator

Inbal-Tish commented May 21, 2023

I can suggest that you try to override the theme stylesheet.day.basic.base styling through the theme prop, for example:

{
'stylesheet.day.basic': {
    base: {
     width: 32,
      height: 32,
      alignItems: 'center',
      justifyContent: 'center'
    }
  }
}

@haeniya
Copy link
Contributor Author

haeniya commented May 21, 2023

@Inbal-Tish Yes, that's what I already did for now. Just thought it might make sense to fix it in the source as others might experience the same issue. But it works for me currently so I'm fine with keeping it as-is. Thanks.

@choijiho0021
Copy link

Thank you for the issue that helped me a lot.

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.

None yet

3 participants