werner-scholtz / kalender

An elegantly crafted Flutter calendar UI package.
MIT License
107 stars 29 forks source link

Calendar controller with default calendarDateTimeRange displays wrong columns #100

Open StasKalishenko opened 2 weeks ago

StasKalishenko commented 2 weeks ago

Actually, it happens on the latest Flutter 3.24.4 and I'm not sure how it's related. For sure, it was ok on Flutter 3.19.5. Steps to reproduce:

  1. In original component's example remove calendarDateTimeRange (we didn't want to limit user)
final CalendarController<Event> controller = CalendarController(
    initialDate: DateTime(2024, 11, 9),
  );
  1. And use custom configuration with 3 days by default.
CustomMultiDayConfiguration(
      name: 'Custom',
      numberOfDays: 3,
    ),
  1. As a result, calendar shows 09.11 column as last column, but it should be first.

If to set not default calendar date range, like:

calendarDateTimeRange: DateTimeRange(
      start: DateTime(DateTime.now().year - 1),
      end: DateTime(DateTime.now().year + 1),
    ),

everything is fine and 09.11 column is first.

werner-scholtz commented 3 days ago

Thank you for the feedback it is appreciated and sorry for the late reply

I'm releasing v0.5.0 of the calendar package later this year, once it is released and most of the issues are ironed out, I'll take a look at this.