Comments (10)
Thanks I was able to replicate the issues by changing my timezone, I cannot fix it right now but should be able to fix it this weekend or next.
from kalender.
Thank you! Much better now!
but some little problems persist...
Case
Open: https://werner-scholtz.github.io/kalender/
In "date picker" set the date to 01.04.2024 and click "Ok"
expected to see 01/04/2024 date
but for now I see 31/03/2024
from kalender.
That is weird I can't seem to reproduce it. Is the view configuration setup like this ?
from kalender.
I don't change any settings.
Enable Reschedule = true
Enable Resize = true
Kalender.Example.-.Google.Chrome.2024-03-05.15-34-42.mp4
from kalender.
It reproduced in my project on Android/iOS
Here is some stack trace from my project, maybe it can help
โโโก EXCEPTION CAUGHT BY RENDERING LIBRARY โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
The following assertion was thrown during performLayout():
BoxConstraints forces an infinite width.
These invalid constraints were provided to RenderStack's layout() function by the following
function, which probably computed the invalid constraints in question:
RenderStack.layoutPositionedChild (package:flutter/src/rendering/stack.dart:516:11)
The offending constraints were:
BoxConstraints(w=Infinity, h=1008.0)
The relevant error-causing widget was:
Stack
Stack:file:///C:/Users/*/lib/src/views/multi_day_view/multi_day_page_content.dart:162:20
When the exception was thrown, this was the stack:
#0 BoxConstraints.debugAssertIsValid.<anonymous closure>.throwError (package:flutter/src/rendering/box.dart:519:9)
#1 BoxConstraints.debugAssertIsValid.<anonymous closure> (package:flutter/src/rendering/box.dart:569:11)
#2 BoxConstraints.debugAssertIsValid (package:flutter/src/rendering/box.dart:577:6)
#3 RenderObject.layout (package:flutter/src/rendering/object.dart:2439:24)
#4 RenderBox.layout (package:flutter/src/rendering/box.dart:2389:11)
#5 RenderStack.layoutPositionedChild (package:flutter/src/rendering/stack.dart:516:11)
#6 RenderStack.performLayout (package:flutter/src/rendering/stack.dart:621:30)
#7 RenderObject.layout (package:flutter/src/rendering/object.dart:2546:7)
#8 RenderBox.layout (package:flutter/src/rendering/box.dart:2389:11)
#9 _RenderLayoutBuilder.performLayout (package:flutter/src/widgets/layout_builder.dart:310:14)
#10 RenderObject.layout (package:flutter/src/rendering/object.dart:2546:7)
#11 RenderBox.layout (package:flutter/src/rendering/box.dart:2389:11)
#12 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#13 RenderObject.layout (package:flutter/src/rendering/object.dart:2546:7)
#14 RenderBox.layout (package:flutter/src/rendering/box.dart:2389:11)
#15 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#16 RenderObject.layout (package:flutter/src/rendering/object.dart:2546:7)
#17 RenderBox.layout (package:flutter/src/rendering/box.dart:2389:11)
#18 RenderSliverFixedExtentBoxAdaptor.performLayout (package:flutter/src/rendering/sliver_fixed_extent_list.dart:309:19)
#19 RenderObject.layout (package:flutter/src/rendering/object.dart:2546:7)
#20 RenderSliverEdgeInsetsPadding.performLayout (package:flutter/src/rendering/sliver_padding.dart:139:12)
#21 _RenderSliverFractionalPadding.performLayout (package:flutter/src/widgets/sliver_fill.dart:160:11)
#22 RenderObject.layout (package:flutter/src/rendering/object.dart:2546:7)
#23 RenderViewportBase.layoutChildSequence (package:flutter/src/rendering/viewport.dart:601:13)
#24 RenderViewport._attemptLayout (package:flutter/src/rendering/viewport.dart:1554:12)
#25 RenderViewport.performLayout (package:flutter/src/rendering/viewport.dart:1463:20)
#26 RenderObject.layout (package:flutter/src/rendering/object.dart:2546:7)
#27 RenderBox.layout (package:flutter/src/rendering/box.dart:2389:11)
#28 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#29 RenderObject.layout (package:flutter/src/rendering/object.dart:2546:7)
#30 RenderBox.layout (package:flutter/src/rendering/box.dart:2389:11)
#31 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#32 RenderObject.layout (package:flutter/src/rendering/object.dart:2546:7)
#33 RenderBox.layout (package:flutter/src/rendering/box.dart:2389:11)
#34 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#35 RenderObject.layout (package:flutter/src/rendering/object.dart:2546:7)
#36 RenderBox.layout (package:flutter/src/rendering/box.dart:2389:11)
#37 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#38 RenderObject.layout (package:flutter/src/rendering/object.dart:2546:7)
#39 RenderBox.layout (package:flutter/src/rendering/box.dart:2389:11)
#40 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#41 RenderObject.layout (package:flutter/src/rendering/object.dart:2546:7)
#42 RenderBox.layout (package:flutter/src/rendering/box.dart:2389:11)
#43 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#44 RenderObject.layout (package:flutter/src/rendering/object.dart:2546:7)
#45 RenderBox.layout (package:flutter/src/rendering/box.dart:2389:11)
#46 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#47 RenderObject.layout (package:flutter/src/rendering/object.dart:2546:7)
#48 RenderBox.layout (package:flutter/src/rendering/box.dart:2389:11)
#49 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#50 RenderCustomPaint.performLayout (package:flutter/src/rendering/custom_paint.dart:569:11)
#51 RenderObject.layout (package:flutter/src/rendering/object.dart:2546:7)
#52 RenderBox.layout (package:flutter/src/rendering/box.dart:2389:11)
#53 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#54 RenderObject.layout (package:flutter/src/rendering/object.dart:2546:7)
#55 RenderBox.layout (package:flutter/src/rendering/box.dart:2389:11)
#56 RenderStack.layoutPositionedChild (package:flutter/src/rendering/stack.dart:516:11)
#57 RenderStack.performLayout (package:flutter/src/rendering/stack.dart:621:30)
#58 RenderObject._layoutWithoutResize (package:flutter/src/rendering/object.dart:2385:7)
#59 PipelineOwner.flushLayout (package:flutter/src/rendering/object.dart:1025:18)
#60 PipelineOwner.flushLayout (package:flutter/src/rendering/object.dart:1038:15)
#61 RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:591:23)
#62 WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:986:13)
#63 RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:457:5)
#64 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1325:15)
#65 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1255:9)
#66 SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:1113:5)
#70 _invoke (dart:ui/hooks.dart:314:10)
#71 PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:383:5)
#72 _drawFrame (dart:ui/hooks.dart:283:31)
(elided 3 frames from dart:async)
from kalender.
I found problem
\lib\src\extensions.dart:10
start.startOfDay.difference(end.endOfDay).inDays //returns 1 instead of 2
In case when
start = 2024-03-30 00:00:00.000
end = 2024-03-31 00:00:00.000
because of Daylight saving time (DST)
because start.startOfDay.difference(end.endOfDay).inHours = 47 hours instead of 48 hours
here is possible workaround:
final startDay = DateTime.utc(start.year, start.month, start.day);
final endDay = DateTime.utc(end.year, end.month, end.day);
return (endDay - startDay).inDays;
P.S. I think this is not the only place where this error occurs and need to check all other places
from kalender.
Hi thanks for bringing this to my attention I don't experience daylight savings myself and for debugging will take a closer look at this.
from kalender.
Here is another example, select the Custom period (in fact it is 2 days) and select the date March 29-30
we see that only one column is drawn
from kalender.
Hi should be fixed now.
from kalender.
Time to write some more tests ๐งช
from kalender.
Related Issues (20)
- Click and Drag in Weekview has offset when start or end hours are changed HOT 4
- CustomMultiDayConfiguration haven't the property showHeader like MonthConfiguration HOT 5
- Timezone bug HOT 3
- Opportunity to set width for events HOT 4
- bug: not showing the current day. HOT 4
- Change the color and font of day in weekly configuration HOT 4
- Auto-scroll when dragging events HOT 5
- Focus on current time HOT 1
- Question: While Developing, Reload Package changes? HOT 5
- Horizontal free scroll HOT 1
- UX issue when creating event. HOT 4
- Custom Hour Height HOT 3
- Issue in week days header HOT 1
- Getting issue in Editing Events HOT 1
- Tiles style enhancements HOT 2
- Scrolling with trackpad causes an event to be created
- Question about visible date range HOT 3
- Horizontal free scroll through days HOT 1
- Kalendar Rework SoW HOT 1
- [Feature] Set default minimal height of event HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kalender.