From f64f89c3746058c89ed062b002ab49190c989dfa Mon Sep 17 00:00:00 2001 From: Shatanik Mahanty Date: Mon, 27 May 2024 11:57:40 +0530 Subject: [PATCH 1/4] Fix: Pass correct type to isInRange extension for calculateAvailableEventsForRange function --- lib/src/utils/event_utils.dart | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/src/utils/event_utils.dart b/lib/src/utils/event_utils.dart index a4e86b8..0250ced 100644 --- a/lib/src/utils/event_utils.dart +++ b/lib/src/utils/event_utils.dart @@ -33,10 +33,12 @@ List calculateAvailableEventsForRange( DateTime.utc(event.begin.year, event.begin.month, event.begin.day); final eventEndUtc = DateTime.utc(event.end.year, event.end.month, event.end.day); - if (eventStartUtc.toJiffy().isInRange(start, end) || - eventEndUtc.toJiffy().isInRange(start, end) || - (start?.isInRange(eventStartUtc, eventEndUtc) ?? false) || - (end?.isInRange(eventStartUtc, eventEndUtc) ?? false)) { + final eventStartUtcJiffy = eventStartUtc.toJiffy(); + final eventEndUtcJiffy = eventEndUtc.toJiffy(); + if (eventStartUtcJiffy.isInRange(start, end) || + eventEndUtcJiffy.isInRange(start, end) || + (start?.isInRange(eventStartUtcJiffy, eventEndUtcJiffy) ?? false) || + (end?.isInRange(eventStartUtcJiffy, eventEndUtcJiffy) ?? false)) { eventsHappen.add(event); } } From e0870813524aed6e170eefeb8f79cb46e1f92ca3 Mon Sep 17 00:00:00 2001 From: Shatanik Mahanty Date: Wed, 12 Jun 2024 16:43:58 +0530 Subject: [PATCH 2/4] Update pubspec.yaml --- pubspec.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pubspec.yaml b/pubspec.yaml index 3208ca7..d170240 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: cr_calendar description: Awesome calendar with customizations, range picking and event showing. -version: 1.2.1 +version: 1.3.0 homepage: https://cleveroad.com repository: https://github.com/Cleveroad/cr_calendar @@ -19,8 +19,8 @@ dependencies: flutter: sdk: flutter - intl: ^0.18.1 - jiffy: ^6.2.1 + intl: ^0.19.0 + jiffy: ^6.3.1 scrollable_positioned_list: ^0.3.8 dev_dependencies: From 77785c421390ac39a292e37e1928207dba2b730e Mon Sep 17 00:00:00 2001 From: Shatanik Mahanty Date: Wed, 12 Jun 2024 16:44:29 +0530 Subject: [PATCH 3/4] Update CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d8b9445..ea4757a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# 1.3.1 + +- Updated dependencies + # 1.2.1 - Updated dependencies From 87909bfaa9b1529668040c5fae1a2b2e250e6db2 Mon Sep 17 00:00:00 2001 From: Shatanik Mahanty Date: Wed, 12 Jun 2024 16:45:05 +0530 Subject: [PATCH 4/4] Fix version number in changelog.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ea4757a..006863d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -# 1.3.1 +# 1.3.0 - Updated dependencies