werner-scholtz / kalender

An elegantly crafted Flutter calendar UI package.
MIT License
93 stars 26 forks source link

Tile does not appear on the last day #65

Closed NobleO11 closed 5 months ago

NobleO11 commented 5 months ago

Hello, I see that the tile is not being drawed to the last day, any idea how to accomplish this without increasing the toDate value?

when for example set fromDate = "2024-04-09 05:00:00.000" and toDate = "2024-04-10 04:01:00.000", as you can see this event is on 2 days, but it will draw tile on the "2024-04-09 05:00:00.000" only, because this event's duration is less than 24 hours, if it is more than 24 hours it will draw tiles correctly to the end. so, I can increase the toDate until it is more than 24 hours ahead from fromDate but it is not recommended since info here must be very accurate and must not change anything. because I'm using it for real events for public.

note: I can't change user input to manipulate tiles because then there is no accuracy.

if you could look into this matter, it will be appreciated, thank you.

werner-scholtz commented 5 months ago

Hi I'm not sure what you mean exactly so when I input this fromDate = "2024-04-09 05:00:00.000" and toDate = "2024-04-10 04:01:00.000" it renders the tile on both days, is this not the case for you ?

image

NobleO11 commented 5 months ago

I mean in Month view.

Screenshot (4)

check above image, the tile is not rendered in the last day, and you can see the last day in popup.

toDate is on 24th day of April, yet it is not rendered!

Screenshot (5)

and now check this, it is rendered now because the toDate time [I mean only hour & minutes] is more than the fromDate.

both screenshots as you can see is on same days but different in hours

werner-scholtz commented 5 months ago

Will fix, thanks for finding the bug 👍

werner-scholtz commented 5 months ago

Hi I have the fixed lined up, it is applied to the web_demo just give it a try there and let me know if it fixes the issue for you. then I will merge the pr.

NobleO11 commented 5 months ago

thank you so much. it is good now :).