Closed ShiyanaSam closed 4 months ago
TableCalendar( calendarStyle: CalendarStyle( todayTextStyle: AppTextStyles.n14w600.black, todayDecoration: const BoxDecoration(borderRadius: null),
// rangeStartDecoration = const BoxDecoration(color: const Color(0xFF6699FF), shape: BoxShape.circle), rangeHighlightColor: AppColors.progressBackground, rangeStartTextStyle: AppTextStyles.n14w600.white, rangeEndTextStyle: AppTextStyles.n14w600.white, rangeStartDecoration: BoxDecoration( borderRadius: BorderRadius.circular(10), color: AppColors.primaryLightPurple, // shape: BoxShape.circle ), rangeEndDecoration: BoxDecoration( color: AppColors.primaryLightPurple, borderRadius: BorderRadius.circular(10), ), ), rowHeight: 40, currentDay: DateTime.now(), focusedDay: DateTime.now(), firstDay: DateTime(2000), lastDay: DateTime.now(), // selectedDayPredicate: (day) { // return isSameDay(DateTime.now(), day); // }, onFormatChanged: (format) { // setState(() { // _calendarFormat = format; // }); }, onPageChanged: (focusedDay) { _focusedDay = focusedDay; }, rangeEndDay: _rangeEnd, rangeStartDay: _rangeStart, rangeSelectionMode: RangeSelectionMode.toggledOn, onRangeSelected: _onRangeSelected, headerStyle: HeaderStyle( titleCentered: true, titleTextStyle: AppTextStyles.n16w700, formatButtonVisible: false, ), daysOfWeekStyle: DaysOfWeekStyle( weekdayStyle: AppTextStyles.n12w700.primaryPurple, weekendStyle: AppTextStyles.n12w700.primaryPurple, ), ), This is the code. If the user wants to select a range from previous year to current year by drag gesture. is it possible?
Check out https://github.com/aleksanderwozniak/table_calendar/issues/767 - closing this one as duplicate.
TableCalendar( calendarStyle: CalendarStyle( todayTextStyle: AppTextStyles.n14w600.black, todayDecoration: const BoxDecoration(borderRadius: null),