Giter Club home page Giter Club logo

Comments (12)

mileskrell avatar mileskrell commented on August 17, 2024 1

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.

Skyost avatar Skyost commented on August 17, 2024

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.

mileskrell avatar mileskrell commented on August 17, 2024

I'm seeing this behavior with WeekView. (I haven't even tried DayView yet.)

from flutterweekview.

Skyost avatar Skyost commented on August 17, 2024

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 like dates: [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.

mileskrell avatar mileskrell commented on August 17, 2024

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.

Skyost avatar Skyost commented on August 17, 2024

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.

mileskrell avatar mileskrell commented on August 17, 2024

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.

Skyost avatar Skyost commented on August 17, 2024

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.

mileskrell avatar mileskrell commented on August 17, 2024

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:
missing_events
Any idea as to why this is happening?

from flutterweekview.

Skyost avatar Skyost commented on August 17, 2024

Wow, you're right, that's not normal. I'm gonna check it soon.

from flutterweekview.

Skyost avatar Skyost commented on August 17, 2024

So you were right ! Sorry for my bad understanding, I'm not a native english speaker πŸ˜…

from flutterweekview.

Skyost avatar Skyost commented on August 17, 2024

No problem, thanks for reporting !

from flutterweekview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.