react-native-calendars icon indicating copy to clipboard operation
react-native-calendars copied to clipboard

timeline display wrong: all event display in one day

Open fukemy opened this issue 3 years ago • 2 comments

Hi, please see the attach image for decription: Screen Shot 2022-07-15 at 17 41 31

Here is my data:

const EVENTS = [
    {
      start: `${getDate(-1)} 09:20:00`,
      end: `${getDate(-1)} 12:00:00`,
      title: 'Merge Request to React Native Calendars',
      summary: 'Merge Timeline Calendar to React Native Calendars'
    },
    {
      start: `${getDate()} 01:15:00`,
      end: `${getDate()} 02:30:00`,
      title: 'Meeting A',
      summary: 'Summary for meeting A',
      color: EVENT_COLOR
    },
    {
      start: `${getDate()} 01:30:00`,
      end: `${getDate()} 02:30:00`,
      title: 'Meeting B',
      summary: 'Summary for meeting B',
      color: EVENT_COLOR
    },
    {
      start: `${getDate()} 01:45:00`,
      end: `${getDate()} 02:45:00`,
      title: 'Meeting C',
      summary: 'Summary for meeting C',
      color: EVENT_COLOR
    },
    {
      start: `${getDate()} 02:40:00`,
      end: `${getDate()} 03:10:00`,
      title: 'Meeting D',
      summary: 'Summary for meeting D',
      color: EVENT_COLOR
    },
    {
      start: `${getDate()} 02:50:00`,
      end: `${getDate()} 03:20:00`,
      title: 'Meeting E',
      summary: 'Summary for meeting E',
      color: EVENT_COLOR
    },
    {
      start: `${getDate()} 04:30:00`,
      end: `${getDate()} 05:30:00`,
      title: 'Meeting F',
      summary: 'Summary for meeting F',
      color: EVENT_COLOR
    },
    {
      start: `${getDate(1)} 00:30:00`,
      end: `${getDate(1)} 01:30:00`,
      title: 'Visit Grand Mother',
      summary: 'Visit Grand Mother and bring some fruits.',
      color: 'lightblue'
    },
    {
      start: `${getDate(1)} 02:30:00`,
      end: `${getDate(1)} 18:20:00`,
      title: 'Meeting with Prof. Behjet Zuhaira',
      summary: 'Meeting with Prof. Behjet at 130 in her office.',
      color: EVENT_COLOR
    },
    {
      start: `${getDate(1)} 04:10:00`,
      end: `${getDate(1)} 04:40:00`,
      title: 'Tea Time with Dr. Hasan',
      summary: 'Tea Time with Dr. Hasan, Talk about Project'
    },
    {
      start: `${getDate(1)} 01:05:00`,
      end: `${getDate(1)} 01:35:00`,
      title: 'Dr. Mariana Joseph',
      summary: '3412 Piedmont Rd NE, GA 3032'
    },
    {
      start: `${getDate(1)} 14:30:00`,
      end: `${getDate(1)} 16:30:00`,
      title: 'Meeting Some Friends in ARMED',
      summary: 'Arsalan, Hasnaat, Talha, Waleed, Bilal',
      color: 'pink'
    },
    {
      start: `${getDate(2)} 01:40:00`,
      end: `${getDate(2)} 02:25:00`,
      title: 'Meet Sir Khurram Iqbal',
      summary: 'Computer Science Dept. Comsats Islamabad',
      color: 'orange'
    },
    {
      start: `${getDate(2)} 04:10:00`,
      end: `${getDate(2)} 04:40:00`,
      title: 'Tea Time with Colleagues',
      summary: 'WeRplay'
    },
    {
      start: `${getDate(2)} 00:45:00`,
      end: `${getDate(2)} 01:45:00`,
      title: 'Lets Play Apex Legends',
      summary: 'with Boys at Work'
    },
    {
      start: `${getDate(2)} 11:30:00`,
      end: `${getDate(2)} 12:30:00`,
      title: 'Dr. Mariana Joseph',
      summary: '3412 Piedmont Rd NE, GA 3032'
    },
    {
      start: `${getDate(4)} 12:10:00`,
      end: `${getDate(4)} 13:45:00`,
      title: 'Merge Request to React Native Calendars',
      summary: 'Merge Timeline Calendar to React Native Calendars'
    }
  ];

here is my view:

<CalendarProvider
                date={currentDate}
                onDateChanged={onDateChanged}
                onMonthChange={onMonthChange}
                showTodayButton
                todayBottomMargin={38}
                disabledOpacity={0.6}
                // numberOfDays={3}
            >
                <ExpandableCalendar
                    firstDay={1}
                    markedDates={{
                        [`${getDate(-1)}`]: {marked: true},
                        [`${getDate()}`]: {marked: true, color: 'red', backgroundColor: 'red'},
                        [`${getDate(1)}`]: {marked: true},
                        [`${getDate(2)}`]: {marked: true},
                        [`${getDate(4)}`]: {marked: true}
                      }}
                />
                <Timeline
                    events={EVENTS}
                    timelineProps={{
                        format24h: true,
                        // onBackgroundLongPress: this.createNewEvent,
                        // onBackgroundLongPressOut: this.approveNewEvent,
                        // scrollToFirst: true,
                        start: 0,
                        end: 24,
                        // scrollToNow: true,
                        // unavailableHours: [{start: 0, end: 6}, {start: 22, end: 24}],
                        overlapEventsSpacing: 8,
                        rightEdgeSpacing: 24,
                        onEventPress: event => console.log(`onEventPress ${event}`),
                        eventTapped: event => console.log(`eventTapped ${event}`)
                        
                      }}
                    showNowIndicator
                    // scrollToNow
                    scrollToFirst
                    initialTime={{hour: 0, minutes: 0}}
                />
            </CalendarProvider>

the version of calendar: "react-native-calendars": "^1.1275.0",

fukemy avatar Jul 15 '22 10:07 fukemy

when i clicked into other day, only toDay button show, the timeline does not change data follow the chosen date

fukemy avatar Jul 15 '22 10:07 fukemy

i changed to v1.1285.0, and now it's does not display everything

fukemy avatar Jul 18 '22 07:07 fukemy

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.

stale[bot] avatar Oct 16 '22 15:10 stale[bot]