field today: "today", not work
when using LocaleConfig and setting the field:
today: "hoje",
returns error in vscode:
Object literal may only specify known properties, and 'today' does not exist in type 'locale_detail'.ts(2322)
code example:
LocaleConfig.locales['pt-br'] = {
monthNames: [
'Janeiro',
'Fevereiro',
'Março',
'Abril',
'Maio',
'Junho',
'Julho',
'Agosto',
'Setembro',
'Outubro',
'Novembro',
'Dezembro',
],
monthNamesShort: [
'Jan',
'Fev',
'Mar',
'Abr',
'Mai',
'Jun',
'Jul',
'Ago',
'Set',
'Out',
'Nov',
'Dez',
],
dayNames: [
'Domingo',
'Segunda',
'Terça',
'Quarta',
'Quinta',
'Sexta',
'Sábado',
],
dayNamesShort: ['DOM', 'SEG', 'TER', 'QUA', 'QUI', 'SEX', 'SÁB'],
today: "Hoje",
};
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
monthNamesShort also does not work. Has there been any resolution to this issue?
I have imported the LocaleConfig into my project and am using dayNamesShort which works perfectly like so:
const SHORT_WEEK_DAYS = ['S', 'M', 'T', 'W', 'T', 'F', 'S'];
LocaleConfig.locales[LocaleConfig.defaultLocale].dayNamesShort =
SHORT_WEEK_DAYS;
But using monthNamesShort in the same way does not do anything. this is what I have
const SHORT_MONTH_NAME = [
'Jan',
'Feb',
'Mar',
'Apr',
'May',
'Jun',
'Jul',
'Aug',
'Sep',
'Oct',
'Nov',
'Dec',
];
LocaleConfig.locales[LocaleConfig.defaultLocale].monthNamesShort =
SHORT_MONTH_NAME;
Using it like this also doesn't work:
LocaleConfig.locales[LocaleConfig.defaultLocale] = {
monthNamesShort: SHORT_MONTH_NAME,
dayNamesShort: SHORT_WEEK_DAYS,
};
Has anyone had this issue?
UPDATE:
I got around this issue by using monthNames instead of monthNamesShort
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.