diff --git a/example/lib/main.dart b/example/lib/main.dart index 500a1b5..c1b113c 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -24,7 +24,6 @@ class MyApp extends StatelessWidget { GlobalMaterialLocalizations.delegate, GlobalCupertinoLocalizations.delegate, ], - locale: const Locale('nl', 'NL'), supportedLocales: const [ Locale('nl', 'NL'), Locale('en', 'US'), diff --git a/lib/src/widgets/overlay_date_time_picker/date_picker.dart b/lib/src/widgets/overlay_date_time_picker/date_picker.dart index 9bb4fbd..28d7b8c 100644 --- a/lib/src/widgets/overlay_date_time_picker/date_picker.dart +++ b/lib/src/widgets/overlay_date_time_picker/date_picker.dart @@ -53,7 +53,8 @@ class DatePicker extends StatelessWidget { padding: const EdgeInsets.only(top: 8), child: Row( children: List.generate(DateTime.daysPerWeek, (index) { - DateFormat dateFormatter = DateFormat("EE"); + DateFormat dateFormatter = + DateFormat.E(Localizations.localeOf(context).toString()); return Expanded( child: Center( child: Padding( diff --git a/lib/src/widgets/overlay_date_time_picker/overlay.dart b/lib/src/widgets/overlay_date_time_picker/overlay.dart index b0081f6..4f12d41 100644 --- a/lib/src/widgets/overlay_date_time_picker/overlay.dart +++ b/lib/src/widgets/overlay_date_time_picker/overlay.dart @@ -93,7 +93,8 @@ class _OverlayDateTimeContentState extends State { iconSize: widget.theme.paginationSize, ), Text( - DateFormat.yMMMM().format( + DateFormat.yMMMM(Localizations.localeOf(context).toString()) + .format( widget.controller.browsingDate, ), style: widget.theme.barTheme.textStyle,