fixed dates before now
parent
d917387bb4
commit
36abb7da36
|
@ -48,7 +48,8 @@ List<TZDateTime> createTZDateTimes(
|
|||
selectedDays.map((day) => weekDays[day]);
|
||||
for (int i = 0; i < trainingTime; i++) {
|
||||
final DateTime date = DateTime.now().add(Duration(days: i));
|
||||
if (selectedDaysInt.contains(date.weekday)) {
|
||||
if (selectedDaysInt.contains(date.weekday) &&
|
||||
date.isAfter(DateTime.now())) {
|
||||
tzDateTimes.add(TZDateTime.local(date.year, date.month, date.day,
|
||||
selectedHours, selectedMinutes, 0, 0, 0));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue