Skip to content

High performance self-hosted photo and video management solution.

fix(mobile): birthday picker shows limited months when no date exists (#26407)

socksproxd94d9600a71e
diff --git a/mobile/lib/presentation/widgets/people/person_edit_birthday_modal.widget.dart b/mobile/lib/presentation/widgets/people/person_edit_birthday_modal.widget.dart
index dd6390406b..7ed02af26b 100644
--- a/mobile/lib/presentation/widgets/people/person_edit_birthday_modal.widget.dart
+++ b/mobile/lib/presentation/widgets/people/person_edit_birthday_modal.widget.dart
@@ -25,7 +25,7 @@ class _DriftPersonNameEditFormState extends ConsumerState<DriftPersonBirthdayEdi
@override
void initState() {
super.initState();
- _selectedDate = widget.person.birthDate ?? DateTime.now();
+ _selectedDate = widget.person.birthDate ?? DateTime(DateTime.now().year - 30, 1, 1);
}
void saveBirthday() async {
@@ -90,6 +90,7 @@ class _DriftPersonNameEditFormState extends ConsumerState<DriftPersonBirthdayEdi
selectedDate: _selectedDate,
locale: context.locale,
minimumDate: DateTime(1800, 1, 1),
+ maximumDate: DateTime.now(),
onDateTimeChanged: (DateTime value) {
setState(() {
_selectedDate = value;