Skip to content

Conversation

sina-byn
Copy link

Fix Persian / Jalali Calendar Month Dropdown Display

This PR addresses the issue where the month dropdown in the Persian / Jalali calendar captionLayout='dropdown' was still displaying Gregorian months.

Fixes/Closes #8305

Changes include:

Updated the documentation/example to show how to pass the formatMonthDropdown function when instantiating the Calendar component:

<Calendar
  mode="single"
  selected={date}
  onSelect={handleDateSelect}
  autoFocus
  captionLayout="dropdown"
  formatters={{
    formatMonthDropdown: (date) =>
      date.toLocaleString("fa-IR", { month: "short" }),
  }}
/>;

Result:

  • Month dropdown now correctly displays Persian / Jalali month names.
  • Provides both instance-level and global ways to configure month formatting.

Copy link

vercel bot commented Sep 28, 2025

@sina-byn is attempting to deploy a commit to the shadcn-pro Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bug]: Month Dropdown Shows Gregorian Months in Persian / Jalali Calendar
1 participant