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 Week View. Today 10pm to tommorw 8am event will trhow an error #96

Closed
edoliantesjr opened this issue Aug 17, 2022 · 3 comments
Closed

Comments

@edoliantesjr
Copy link

_calendarWeekEventList.add(CalendarEventData( date: DateTime(2022, 08, 14, 20, 0), startTime: DateTime(2022, 08, 14, 20, 0), endTime: DateTime(2022, 08, 15, 8, 23), endDate: DateTime(2022, 08, 15, 8, 23), title: '${DateFormat.jm().format(_startDate)} ' '- ${DateFormat.jm().format(_endDate)} ' '\n${_provider.name}', event: _event.toJson(), description: _event.$id, color: colorFromString(_provider.color), ));

Error Message:
startDate must be less than endDate.
This error occurs when you does not provide startDate or endDate in CalendarEventDate or provided endDate occurs before startDate.
'package:calendar_view/src/event_arrangers/side_event_arranger.dart':
Failed assertion: line 130 pos 11: '!(endTime.getTotalMinutes <= startTime.getTotalMinutes)'

@ParthBaraiya
Copy link
Collaborator

Hello @edoliantesjr That is the expected behaviour as we do not have the support for multi-day events yet.

Current implementation ignores dates in startTime and endTime parameters. So, If you have Date with value DateTime(2022, 08, 14, 14, 20) only hours and minutes will be considered. Year, Month and Day will be ignored.

We are planning to implement this in near future.

@ParthBaraiya
Copy link
Collaborator

I'm closing this issue for now as we already have similar issue #23 open.

@Muhammed-Ayad
Copy link

Muhammed-Ayad commented Oct 2, 2022

Is the problem solved?
@ParthBaraiya

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

No branches or pull requests

3 participants