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

event widget range bug #19

Open
jihanga opened this issue Jun 20, 2023 · 2 comments
Open

event widget range bug #19

jihanga opened this issue Jun 20, 2023 · 2 comments

Comments

@jihanga
Copy link

jihanga commented Jun 20, 2023

If there is a date that ends on the last day of the week based on the calendar, the event widget is drawn for another week (for this screenshot, it's Saturday)

The _mapSimpleEventToDrawerOrNull function in the event_util.dart file determines the scope of the event widget, which seems to have caused a bug.
In this function, the code part below is the part that handles exceptions, but it does not appear to be properly handled.

if (jEnd.isBefore(begin, unit: Unit.day) ||
  jBegin.isAfter(end, unit: Unit.day)) {
  return null;
}

So as a temporary measure, I'll get rid of unit parameters

if (jEnd.isBefore(begin) ||
  jBegin.isAfter(end)) {
  return null;
}

If you make it into , the bug disappears.

Please check if the solution I solved is right.
If this is not a solution, I would like you to tell me the role of the unit parameter.

스크린샷 2023-06-20 오후 5 52 25 스크린샷 2023-06-20 오후 5 41 27 스크린샷 2023-06-20 오후 5 41 36

The three screenshots above are the screens with bugs.

The event widget exists until July 1, but the actual event only exists until June 24.

스크린샷 2023-06-20 오후 5 42 00

After fixing the code, the bug disappeared like this.

@jihanga jihanga changed the title I think I found a bug in the _mapSimpleEventToDrawerOrNull function in the event_util.dart file event widget range bug Jun 21, 2023
jihanga added a commit to jihanga/cr_calendar that referenced this issue Jun 21, 2023
@tricasthu
Copy link
Contributor

This is a Jiffy bug, I have opened a bug report.

In my opinion, we can either wait for Jiffy to evaluate and release a fix or switch to a custom compare logic. I can open a pull request for the latter if needed.

@jihanga
Copy link
Author

jihanga commented Jul 3, 2023

I didn't think it was a bug in Jiffy. I thought it was a simple condition error.
I think you're right.
Thank you for your interest in this issue

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

2 participants