Skip to content

Commit

Permalink
Merge branch 'main' into prod/festapp
Browse files Browse the repository at this point in the history
  • Loading branch information
miakh committed Dec 12, 2024
2 parents 1a7afa8 + 14d3bcf commit 728da6b
Show file tree
Hide file tree
Showing 2 changed files with 187 additions and 177 deletions.
8 changes: 6 additions & 2 deletions lib/widgets/AddNewEventDialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ class AddNewEventDialog {
final eventDayRangeTolerance = 7;
DateTime? minDate;
DateTime? maxDate;
bool isFormValid = true;
bool isFormValid = false;
bool hasTitleBeenEdited = false;

minDate = SynchroService.globalSettingsModel!.eventStartTime!.add(Duration(days: -eventDayRangeTolerance));
maxDate = SynchroService.globalSettingsModel!.eventEndTime!.add(Duration(days: eventDayRangeTolerance));
Expand Down Expand Up @@ -80,14 +81,17 @@ class AddNewEventDialog {
decoration: InputDecoration(
labelText: "Title".tr(),
labelStyle: TextStyle(
color: (title == null || title!.trim().isEmpty)
color: (hasTitleBeenEdited && (title == null || title!.trim().isEmpty))
? ThemeConfig.redColor(context)
: null,
),
),
onChanged: (value) {
setState(() {
title = value;
if (!hasTitleBeenEdited) {
hasTitleBeenEdited = true;
}
validateForm();
});
},
Expand Down
Loading

0 comments on commit 728da6b

Please sign in to comment.