Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.
Dart blogconfluence-alternativecontent-managementcontent-servicesdocumentationflutternote-takingnotion-alternativeproject-managementtask-managementteam-collaborationwiki
fix: wrong date selected in CDT (#3627)
Richard Shiue537c9d086555
diff --git a/frontend/appflowy_flutter/lib/plugins/database_view/widgets/row/cells/date_cell/date_cal_bloc.dart b/frontend/appflowy_flutter/lib/plugins/database_view/widgets/row/cells/date_cell/date_cal_bloc.dartindex adaa9c0e51..0524a899c1 100644--- a/frontend/appflowy_flutter/lib/plugins/database_view/widgets/row/cells/date_cell/date_cal_bloc.dart+++ b/frontend/appflowy_flutter/lib/plugins/database_view/widgets/row/cells/date_cell/date_cal_bloc.dart@@ -86,15 +86,15 @@ class DateCellCalendarBloc: (start, state.startDay!);emit(state.copyWith(startDay: null, endDay: null));await _updateDateData(- date: newStart.toLocal().date,- endDate: newEnd.toLocal().date,+ date: newStart.date,+ endDate: newEnd.date,);} else if (end == null) {emit(state.copyWith(startDay: start, endDay: null));} else {await _updateDateData(- date: start!.toLocal().date,- endDate: end.toLocal().date,+ date: start!.date,+ endDate: end.date,);}},diff --git a/frontend/appflowy_flutter/lib/plugins/database_view/widgets/row/cells/date_cell/date_editor.dart b/frontend/appflowy_flutter/lib/plugins/database_view/widgets/row/cells/date_cell/date_editor.dartindex 63e1c2465e..528181870d 100644--- a/frontend/appflowy_flutter/lib/plugins/database_view/widgets/row/cells/date_cell/date_editor.dart+++ b/frontend/appflowy_flutter/lib/plugins/database_view/widgets/row/cells/date_cell/date_editor.dart@@ -13,7 +13,6 @@ import 'package:appflowy_popover/appflowy_popover.dart';import 'package:dartz/dartz.dart' show Either;import 'package:easy_localization/easy_localization.dart';import 'package:flowy_infra/theme_extension.dart';-import 'package:flowy_infra/time/prelude.dart';import 'package:flowy_infra_ui/flowy_infra_ui.dart';import 'package:flutter/material.dart';import 'package:flutter_bloc/flutter_bloc.dart';@@ -282,7 +281,7 @@ class _DatePickerState extends State<DatePicker> {state.isRange ? false : isSameDay(state.dateTime, day),onDaySelected: (selectedDay, focusedDay) {context.read<DateCellCalendarBloc>().add(- DateCellCalendarEvent.selectDay(selectedDay.toLocal().date),+ DateCellCalendarEvent.selectDay(selectedDay),);},onRangeSelected: (start, end, focusedDay) {