Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/widgets/list_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ class _ListListState extends State<ListList> {
}

Widget buildDueDateWidgetPreview(String newDueDate, String cardId){
DateTime dueDate = DateTime.parse(newDueDate);
DateTime dueDate = DateTime.parse(newDueDate).toLocal();
DateTime now = DateTime.now();
bool isOverdue = dueDate.isBefore(now);

Expand All @@ -681,7 +681,7 @@ class _ListListState extends State<ListList> {


// Check if the due date result is already in the cache
if (dueDateCache.containsKey(dueDate)) {
if (dueDateCache.containsKey(dueDate.toString())) {
// Cache the calculated due date result
dueDateCache[dueDate.toString()] = result;
}
Expand All @@ -695,7 +695,7 @@ class _ListListState extends State<ListList> {

///Update Card Due Date
if(dateTime != null) {
await Provider.of<CardProvider>(context, listen: false).updateCardDueDate(cardId: cardId, newDueDate: dateTime.toString()).then((_) {
await Provider.of<CardProvider>(context, listen: false).updateCardDueDate(cardId: cardId, newDueDate: dateTime.toUtc().toString()).then((_) {
// Call the onRefresh callback if it exists
if (widget.onRefresh != null) {
widget.onRefresh!();
Expand Down