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

Change the type of locale property on Calendar #1750

Closed
mertsincan opened this issue Jan 11, 2021 · 0 comments
Closed

Change the type of locale property on Calendar #1750

mertsincan opened this issue Jan 11, 2021 · 0 comments
Assignees
Labels
Type: Breaking Change Issue contains a breaking change related to a specific component Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone

Comments

@mertsincan
Copy link
Member

The type of locale property is string. Users can give a locale key for a specific Calendar.
Exp;

import { addLocale } from 'primereact/api';
...
addLocale('es', {
            firstDayOfWeek: 1,
            dayNames: ['domingo', 'lunes', 'martes', 'miércoles', 'jueves', 'viernes', 'sábado'],
            dayNamesShort: ['dom', 'lun', 'mar', 'mié', 'jue', 'vie', 'sáb'],
            dayNamesMin: ['D', 'L', 'M', 'X', 'J', 'V', 'S'],
            monthNames: ['enero', 'febrero', 'marzo', 'abril', 'mayo', 'junio', 'julio', 'agosto', 'septiembre', 'octubre', 'noviembre', 'diciembre'],
            monthNamesShort: ['ene', 'feb', 'mar', 'abr', 'may', 'jun', 'jul', 'ago', 'sep', 'oct', 'nov', 'dic'],
            today: 'Hoy',
            clear: 'Claro'
        });

...

<Calendar locale="es" ... />

@mertsincan mertsincan added the Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add label Jan 11, 2021
@mertsincan mertsincan added this to the 6.0.0-rc.1 milestone Jan 11, 2021
@mertsincan mertsincan self-assigned this Jan 11, 2021
@mertsincan mertsincan added the Type: Breaking Change Issue contains a breaking change related to a specific component label Jan 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Breaking Change Issue contains a breaking change related to a specific component Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Projects
None yet
Development

No branches or pull requests

1 participant