Comments (12)
All good! "Current day" was kind of ambiguous here; I probably should have just included a screen recording to begin with. Thanks again for the library, as well as for the quick fix!
from flutterweekview.
I'm sorry but that's the normal behavior π
If you want to show all your events then put them the same date as your DayView
instance. If you want to show more than one day, then consider using WeekView
.
from flutterweekview.
I'm seeing this behavior with WeekView
. (I haven't even tried DayView
yet.)
from flutterweekview.
Then if you want to show your events you have two options :
- You change your events dates.
- You change your
WeekView
dates (in your example something likedates: [date.add(Duration(days: 2))]
will work).
But as I said, not showing events which are not in the provided dates is the required behavior.
from flutterweekview.
I've added that to my dates
, but I'm still not seeing this event.
I think I might have misunderstand your initial response. Is only showing events that overlap the current day the intended behavior? (I understand that not showing events which are not in the provided dates is intended.)
from flutterweekview.
Is only showing events that overlap the current day the intended behavior?
Yes. For example if you have let's say three dates : 2020-01-13
, 2020-01-14
and 2020-01-15
. If you have two events :
- Start :
2020-01-12 21:00
End :2020-01-12 23:00
- Start :
2020-01-15 23:00
End :2020-01-16 02:00
The first one will not appear at all in your WeekView
while the second one will partially appear on the day 2020-01-15
(on the right of 2020-01-14
).
from flutterweekview.
Just to check my understanding: if in your example, we imagine that the current day was 2020-01-13
or 2020-01-14
, then the expected behavior would be that neither of the two events would be visible, because neither overlaps the current day?
I'm unsure that I'm understanding this correctly, because in your comment, you stated that the second event would be visible. But as I understand it, that would only happen if the current day were 2020-01-15
.
Thanks for taking the time to explain this!
from flutterweekview.
Well, it doesn't depend on the current the day but on the dates your provide to the widget via the dates
parameter. You're not limited to only one date, you can provide as many dates as you want.
In my example, you provide three dates 2020-01-13
, 2020-01-14
and 2020-01-15
. You open the widget and you see the events that are starting and / or ending on 2020-01-14
. So in this example you see nothing.
But if you scroll on your right, you see the events that are starting and / or ending on 2020-01-15
. So you see the second event (as it's starting on 2020-01-15
at 23:00
). If you scroll on your left, you see nothing.
You can check the currently shown date here (in red) :
The corresponding code of the example is (not the one of the screenshot) :
WeekView(
dates: [DateTime(2020, 1, 13), DateTime(2020, 1, 14), DateTime(2020, 1, 15)],
events: [
FlutterWeekViewEvent(
title: 'Event 1',
description: 'Description',
start: DateTime(2020, 1, 12, 21, 0),
end: DateTime(2020, 1, 12, 23, 0),
),
FlutterWeekViewEvent(
title: 'Event 2',
description: 'Description',
start: DateTime(2020, 1, 15, 23, 0),
end: DateTime(2020, 1, 16, 2, 0),
),
],
);
from flutterweekview.
it doesn't depend on the current the day but on the dates your provide to the widget via the
dates
parameter
Okay, it's good to hear that the widget isn't supposed to be affected by the current day. However, this isn't what I've experienced. For some reason, I'm only able to see events that occur during the current day.
For example, with the following codeβ¦
WeekView(
dates: [DateTime(2020, 1, 14), DateTime(2020, 1, 15), DateTime(2020, 1, 16)],
events: [
FlutterWeekViewEvent(
title: 'Event on 2020-01-14',
description: 'Description',
start: DateTime(2020, 1, 14, 12),
end: DateTime(2020, 1, 14, 13),
),
FlutterWeekViewEvent(
title: 'Event on 2020-01-15',
description: 'Description',
start: DateTime(2020, 1, 15, 12),
end: DateTime(2020, 1, 15, 13),
),
FlutterWeekViewEvent(
title: 'Event on 2020-01-16',
description: 'Description',
start: DateTime(2020, 1, 16, 12),
end: DateTime(2020, 1, 16, 13),
),
],
);
β¦I see this:
Any idea as to why this is happening?
from flutterweekview.
Wow, you're right, that's not normal. I'm gonna check it soon.
from flutterweekview.
So you were right ! Sorry for my bad understanding, I'm not a native english speaker π
from flutterweekview.
No problem, thanks for reporting !
from flutterweekview.
Related Issues (20)
- Custom widget as Event HOT 1
- Press and drag causes UI issues on the web
- dayBarVisible
- Display Day of Week rather than date in WeekView HOT 1
- Only show title of event in WeekView cell HOT 1
- Click detection in an event HOT 4
- hourRowHeight not available
- Ability to scroll by one item in WeekView. HOT 1
- Setting inScrollableWidget to false throws error.
- DayViewController minZoom/maxZoom does not work
- ScrollController not attached to any scroll views HOT 3
- Full week on a single page HOT 1
- Add Ripple effect (using InkWell) to the events HOT 1
- How to get click event, if no event is set? HOT 1
- [FLUTTER 3] Warning: Operand of null-aware operation '?.' has type 'WidgetsBinding' which excludes null.
- Option to add an horizontal scrollbar
- Need current date of scrolled position HOT 3
- not responsive HOT 3
- Current time indicator is not on the exact current time
- how to set 12 hours format in day view ?
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 flutterweekview.