table_calendar icon indicating copy to clipboard operation
table_calendar copied to clipboard

Try to adding some event to firebase

Open xTheMasters opened this issue 2 years ago • 0 comments

Describe the bug When I try to get the date for save any event in flutter firebase if I pick day 5 Jan 2023 when I save in firebase the day saved is 4 Jan 2023 I try to use toLocal, and toUtc, and issue always persist

TableCalendar(
                          focusedDay: _value,
                          rangeStartDay: normalizeDate(_value.toUtc()),
                          firstDay: DateTime(2022),
                          lastDay: DateTime.now(),
                          onDaySelected: (selectedDay, focusedDay) {
                            if (selectedDay == selectedDay) {
                              setState(() => _value = selectedDay);
                            }

                            Navigator.pop(context);
                          },
                        );

xTheMasters avatar Jan 05 '23 19:01 xTheMasters