Skip to content

AM PM isn't translated using the locale when using showTime12hPicker #189

@shadyshrif

Description

@shadyshrif

For example, If I have this code the picker will show AM and PM in Arabic locale while it has another value in the i18 file.

DateTime selectedToTime = DateTime.now();

                                    DatePicker.showTime12hPicker(
                                            context, showTitleActions: true,
                                            locale: LocaleType.ar,
                                            onConfirm: (date) {
                                              print('confirm $date');
                                              setState(() {
                                                selectedToTime = date;
                                              });
                                            },
                                            currentTime: selectedToTime,
                                          )

The solution is simple, just use the translation of the AM and PM from the locale array.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions