We should compare on year, month and day; and not compare hour, min, ms. Copying from a utility in TableCalendar
/// Checks if two DateTime objects are the same day.
/// Returns `false` if either of them is null.
bool isSameDay(DateTime? a, DateTime? b) {
if (a == null || b == null) {
return false;
}
return a.year == b.year && a.month == b.month && a.day == b.day;
}
Current possible Workaround:
final now = DateTime.now();
PlutoColumn(title: "Due Date", field: DueDateField,
type: PlutoColumnType.date(format: "dd/MM/yyyy", startDate: DateTime(now.year, now.month, now.day))
Steps to reproduce the bug
Expected results
Calendar's first valid date is today.
Actual results
Calendar's first valid date is tomorrow.
Fix
We should compare on year, month and day; and not compare hour, min, ms. Copying from a utility in TableCalendar
Current possible Workaround:
Execution Environment
PlutoGrid version is 7.0.2
PS: Thanks for this awesome library!