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

BUG: duplicate 1:00 time label because of daylight savings #339

Open
darren4flow opened this issue Mar 10, 2024 · 0 comments
Open

BUG: duplicate 1:00 time label because of daylight savings #339

darren4flow opened this issue Mar 10, 2024 · 0 comments

Comments

@darren4flow
Copy link

darren4flow commented Mar 10, 2024

Bug description:
clear and concise description
Today we had daylight savings which is resulting in 1:00 being shown instead of 2:00 in the time labels causing duplicate 1:00 keys.

Visual demo:
Screenshots, videos or gifs to help explain your problem
image
Code to reproduce

import WeekView from 'react-native-week-view';

const myEvents = [
  {
    id: 1,
    startDate: new Date(2023, 1, 20, 9),
    endDate: new Date(2023, 1, 20, 11),
    color: 'blue',
    description: 'E1',
    // ... more properties if needed,
  },
  {
    id: 2,
    startDate: new Date(2023, 1, 22, 10),
    endDate: new Date(2023, 1, 22, 11, 30),
    color: 'red',
    description: 'E2',
  },
  // more events...
];

const MyComponent = () => (
  <WeekView
    events={myEvents}
    selectedDate={new Date(2023, 1, 20, 12)}
    numberOfDays={7}
    pageStartAt={{ weekday: 1 }}
  />
);

Environment:
The latest code
Important: using your own fork makes this more difficult to reproduce and solve. We recommend trying with the latest week-view version.

  • react-native-week-view: version X
  • react-native-gesture-handler: version X
  • react-native-reanimated: version X
  • react-native: version X
  • react: version X
  • OS: android / iOS

Additional context (optional):

  • Error message or traceback (if any)
  • Steps to reproduce
  • ...
    Using the calendar on a day that has daylight savings will result in a duplicate key error because of two 1:00 keys for hour labels.
@darren4flow darren4flow changed the title BUG: duplicate 1:00 time label because of time savings BUG: duplicate 1:00 time label because of daylight savings Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants