Skip to content

[SFCalendar] Issue: Cannot Force Western Digits in SfCalendar When App Locale is Arabic #2373

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
h1amza opened this issue Jun 6, 2025 · 3 comments
Labels
calendar Calendar component open Open

Comments

@h1amza
Copy link

h1amza commented Jun 6, 2025

Bug description

When my app's locale is set to Arabic (e.g. Locale('ar', 'MA')), the SfCalendar widget displays all numbers (dates, times, week numbers) using Arabic-Indic digits (e.g. ١,٢,٣).
I want to display all numbers in Western (English) digits (0-9) only in the calendar, while keeping the rest of my app in Arabic.

Steps to reproduce

1- Set your app's locale to Arabic (e.g. Locale('ar', 'MA')).
2- Wrap SfCalendar with Localizations.override(locale: Locale('ar', 'MA')).
3- Observe that all numbers in the calendar are still Arabic-Indic digits.

Code sample

MaterialApp(
locale: Locale('ar', 'MA'),
home: Scaffold(
body: Localizations.override(
context: context,
locale: Locale('ar','MA'),
child: SfCalendar(
view: CalendarView.week,
timeSlotViewSettings: TimeSlotViewSettings(
timeFormat: 'HH:mm',
),
),
),
),
);

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Image
Image

@sfHariHaraSudhan sfHariHaraSudhan added calendar Calendar component open Open labels Jun 9, 2025
@Mugunthan-Ramalingam
Copy link
Contributor

Hi @h1amza,

You can refer to our Knowledge Base (KB) article that explains how to override the localizations in SfCalendar to display the digits instead of Arabic words for numbers in the calendar UI. We have shared the KB documentation for your reference.

KB link: https://support.syncfusion.com/kb/article/11052/how-to-override-the-material-app-locale-and-set-english-language-for-flutter-calendar

However, a GitHub sample reference is attached in the KB documentation. You can refer to the sample and customize it based on your requirements.

If you have any further queries, please get back to us. We are always happy to assist you.

Regards,
Mugunthan.

@sfHariHaraSudhan sfHariHaraSudhan added waiting for customer response Cannot make further progress until the customer responds. and removed open Open labels Jun 10, 2025
@h1amza
Copy link
Author

h1amza commented Jun 10, 2025

Thank you for your reply @Mugunthan-Ramalingam but in CalendarView.week and CalendarView.day, the hour/time labels still display Arabic-Indic digits (١٢) instead of Western digits (12).

could you guide me on how to enforce Western digits (1, 2, 3) in these views?

Appreciate your help,

Image

Image

@h1amza
Copy link
Author

h1amza commented Jun 11, 2025

@sfHariHaraSudhan can you please update the tag label to open

@sfHariHaraSudhan sfHariHaraSudhan added open Open and removed waiting for customer response Cannot make further progress until the customer responds. labels Jun 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
calendar Calendar component open Open
Projects
None yet
Development

No branches or pull requests

3 participants