0

I am using the sfcalendar package

pub.dev

with the > view: CalendarView.month,

But what about the wasted space between the date and the Appointments? (marked red)

Image

here is the code

child: SfCalendar(
      appointmentBuilder: appointmentBuilder,
      controller: _controller,
      onSelectionChanged: selectionChanged,
      view: CalendarView.month,
      initialSelectedDate: DateTime.now(),
      dataSource: dataSource,
      onTap: calendarTapped,
      cellBorderColor: Colors.white,
      backgroundColor: Colors.white,
      onViewChanged: viewChanged,
      todayTextStyle: const TextStyle(
        color: Colors.green,
        fontWeight: FontWeight.w900,
      ),
      todayHighlightColor: Colors.transparent,
      firstDayOfWeek: 1,
      headerHeight: 0,
      viewHeaderHeight: 15,
      selectionDecoration: BoxDecoration(
        border: Border.all(color: Colors.grey.shade800),
        borderRadius: const BorderRadius.all(Radius.circular(5)),
        shape: BoxShape.rectangle,
      ),
      monthViewSettings: MonthViewSettings(
          dayFormat: 'E',
          numberOfWeeksInView: 6,
          appointmentDisplayCount: 3,
          appointmentDisplayMode: MonthAppointmentDisplayMode.appointment,
          monthCellStyle: MonthCellStyle(
            trailingDatesTextStyle:
            TextStyle(fontSize: 15, color: Colors.grey.shade300),
            leadingDatesTextStyle:
            TextStyle(fontSize: 15, color: Colors.grey.shade300),
          )),
    ),

Does anyone have a solution for this?

Also, if anyone knows by any chance, I have more than 3 appointments on that day. I'd prefer to show '...' in the calendar cell to highlight "there are more appointments"

Val
  • 31
  • 1
  • 7
  • Be aware that the SyncFusion products in the Dart/Flutter pub are *not* open source. They are released under a commercial license that may subject you or your organization to a financial liability, and might affect downstream re-users of your code. – Randal Schwartz May 04 '23 at 03:21
  • @RandalSchwartz I am not planning to earn millions with this project. I am not sure how I am to be held liable. Maybe I am not getting this full. However, do you think I could achieve the same with table_calendar https://pub.dev/packages/table_calendar – Val May 05 '23 at 15:23
  • The commercial clause kicks in with either millions *or* five people contributing. That's why I keep posting my note. – Randal Schwartz May 05 '23 at 17:20
  • @RandalSchwartz thank you for your concerns. I‘ve just started coding, I am a nurse and the only developer. I don't think asking a question here counts as one of the five developers. Am I getting this wrong? I might not understand understand this fully. Do i need to be worried? – Val May 12 '23 at 21:35
  • I'm not a lawyer. But I bet they have lawyers. The question is, do you want to risk it when there might be suitable open source available nearby? – Randal Schwartz May 12 '23 at 23:38
  • @RandalSchwartz that's the problem. I can't find something similar. Coding is new for me. I'm at the point where I'd just pay someone to do it for me. – Val May 14 '23 at 00:57

0 Answers0