Skip to content

📅 Range background offset bug in months with 31 days #220

@yehudacy

Description

@yehudacy

When selecting a date range, the background highlight sometimes starts from the next day instead of the selected day.

This only occurs in months with 31 days.

Example: In August, the issue shows up on the 26th.

In October, it shows up on the 28th.

Screenshots
(one showing the expected result and one showing the issue.)

Image Image

Steps to Reproduce

Open the range date picker.

Select a range in a month with 31 days (e.g., August or October).

Notice that the first day of the range is not highlighted(if you make the selected date fully rounded like in the photo it will be more clear), and the background starts from the next day.

Expected Behavior
The highlight should start from the exact selected date, not the following day.

Actual Behavior
The highlight sometimes shifts by one day in months with 31 days.

Environment

Library version: react-native-ui-datepicker 3.0.7
(Can't be on the latest cause of another issue that there is a PR on it but not merged yet)

Platform: iOS/Android

Additional context
This library has been great to use—thank you for building it!
If you have any ideas on a fix or workaround, I’d be happy to help test.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions