-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
- When i swipe to the next month, then tap to select the 1st day of month, the UI did not update the selected day. - Note that the date did captured and updated at the top box there.
- The UI will update only when swipe to other month and return, and select other day then select the 1st day again.
- If select other than the 1st day, will be no issue.
Im using Getx btw.
To reproduce
Please include a short code sample that can be used to reproduce the problem.
Obx(
() => Padding(
padding: EdgeInsets.all(4.w),
child: Card(
elevation: 5,
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 4.w),
child: TableCalendar(
enabledDayPredicate: controller.isDateBlocked,
selectedDayPredicate: (day) {
return controller.selectedCheckInDate.value.year == day.year &&
controller.selectedCheckInDate.value.month == day.month &&
controller.selectedCheckInDate.value.day == day.day;
},
lastDay: DateTime.utc(2100, 1, 1),
firstDay: DateTime.now(),
focusedDay: controller.focusedCheckInDate.value,
calendarFormat: controller.calendarFormat.value,
onPageChanged: (focusedDay) {
controller.focusedCheckInDate.value = focusedDay;
},
headerStyle: const HeaderStyle(
formatButtonVisible : false,
),
calendarStyle: CalendarStyle(
todayDecoration: const BoxDecoration(
shape: BoxShape.circle,
color: AppColors.caramel,
),
markersAlignment: Alignment.bottomCenter,
markerDecoration: const BoxDecoration(
shape: BoxShape.circle,
color: AppColors.chineseYellow,
),
selectedTextStyle: TextStyles.semiBold(
isStatic: true, color: AppColors.white)!,
selectedDecoration: const BoxDecoration(
color: AppColors.chineseYellow, shape: BoxShape.circle),
),
onDaySelected: (selectedDay, focusedDay) {
controller.updateSelectedDate(selectedDay);
controller.selectedCheckInTimeSlot?.value = "";
},
),
),
),
),
),
void updateSelectedDate(DateTime date){
selectedCheckInDate.value = date;
focusedCheckInDate.value = date;
timeSlots = generateTimeIntervals(timeInterval);
refresh();
update();
}
Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Screen.Recording.2026-01-30.at.10.00.58.AM.mov
Output of flutter doctor
Paste the result of this command here.
Output
Additional context
Add any other context about the problem here.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working