Configurable Date Formatter (Support for non-Gregorian Calendars like Jalali/Shamsi in Admin UI) #16054
landa33
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Currently, the Medusa Admin UI relies on the standard Gregorian calendar for rendering dates across all core components (Order lists, Customer details, etc.). For businesses operating in regions that use non-Gregorian calendars (such as the Jalali/Shamsi calendar in Iran, Afghanistan, or the Hijri calendar in other countries), the default date display makes it very difficult for store managers to process orders and track activities efficiently, as they have to manually convert dates in their heads.
Describe the solution you'd like It would be incredibly helpful if the Admin UI provided a way to globally configure or override the default date formatter. Ideally, developers should be able to:
Pass a custom locale to Intl.DateTimeFormat (e.g., fa-IR which natively supports the Jalali calendar in modern browsers).
OR, have a configuration option to provide a custom date adapter/formatter function (similar to how MUI allows date adapters like date-fns-jalali or moment-jalaali) so that all core Medusa components use this adapter before rendering dates.
Describe alternatives you've considered Currently, the only way to achieve this is by completely forking the @medusajs/dashboard package and replacing the date-fns logic manually, or by injecting fragile client-side scripts via admin widgets to parse and replace date strings in the DOM using MutationObserver. Both approaches are hard to maintain and prone to breaking during version updates.
Additional context Medusa is growing globally, and robust internationalization (i18n) isn't just about translating strings—it's also about localizing formats (Dates, Numbers, Currencies). Providing an API or configuration to override the core date formatting function would empower a huge community of developers in the Middle East and beyond to adopt Medusa seamlessly for their local merchants.
All reactions