Skip to content
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

facing issue when customize month order in locale Ja #6650

Open
1 task
maheshbaldaniya001 opened this issue Apr 23, 2024 · 0 comments
Open
1 task

facing issue when customize month order in locale Ja #6650

maheshbaldaniya001 opened this issue Apr 23, 2024 · 0 comments

Comments

@maheshbaldaniya001
Copy link

maheshbaldaniya001 commented Apr 23, 2024

const customMonthOrder: number[] = [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 0, 1]; // March to February

// Get the default full month names
const defaultMonthNames: string[] = jaLocale.months as string[];

// Create an array of full month names in the custom order
const customMonthNames: string[] = customMonthOrder.map(index => defaultMonthNames[index]);

// Create an array of short month names in the custom order
const customMonthShortNames: string[] = customMonthNames.map(month => month.slice(0, 3)); // Take the first 3 characters as short names

// Create the custom locale object
const customLocale = {
  ...jaLocale,
  months: customMonthNames,
  monthsShort: customMonthShortNames,
};

// Define the custom locale
defineLocale('ja-custom', customLocale);

BELCESSBASE (4)

in this scenario label are change but value sequnce still as it's if i was select month 2 and input field select 12 month so what is the issue ??

Tasks

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

No branches or pull requests

2 participants