can i update appointments in sfcalendar with drag and drop functionality?

37 views Asked by At

I write the code of sfCalendar but in month view drag and drop not working

           `SfCalendar(
                onTap: (value) {},
                onViewChanged: (value){
                    controller.appointment.clear();
                    controller.getCalendarData(fromDate: value.visibleDates.first, toDate:          value.visibleDates.last);
                },
                onDragStart: (value){
                  print("======>>>  ${value.appointment}");
                },
                controller: controller.calendarController,
                view: CalendarView.month,
                selectionDecoration: BoxDecoration(
                  borderRadius: BorderRadius.circular(4),
                  border: Border.all(color: ColorRes.yellowDark.withOpacity(1),width: 2),
                ),
                initialDisplayDate: DateTime.now(),
                todayHighlightColor: ColorRes.yellowDark.withOpacity(1),
                monthViewSettings: const MonthViewSettings(appointmentDisplayMode: MonthAppointmentDisplayMode.appointment),
                dataSource: controller.calendarDataSource,
                appointmentBuilder: (context, calendarAppointmentDetails) {
                  return Container(
                    decoration: BoxDecoration(
                      color: ColorRes.yellowDark.withOpacity(1),
                      borderRadius: BorderRadius.circular(5),
                    ),
                    alignment: Alignment.center,
                    child: Text(calendarAppointmentDetails.appointments.first.subject,style:        const TextStyle(color: ColorRes.white),),
                  );
                },
              );`

I want to drag and drop of appointment in calendar in month view ?

flutter i want to create calendar with appointment box is big as appointments subject and drag and drop functionality in calendar appointment

0

There are 0 answers