Skip to content

Document LocaleProvider usage for localized DatePicker #2109

@thiagopereira-vtex

Description

@thiagopereira-vtex

Problem

While integrating the DatePicker component, I noticed that it always displays dates in the "MM-DD-YYYY" format, even when the application's locale is set to "pt-BR". After some investigation, I found that the correct way to localize the DatePicker is to wrap the app (or component tree) with LocaleProvider and pass a prop locale.

However, this wasn't immediately clear from the documentation. It took some time and effort to discover this requirement.

Adding a brief note or example in the documentation showing how to properly configure LocaleProvider for locale support would help other developers avoid confusion and save time when implementing localized date formatting.

Expected behavior

No response

Reproducible Example

Image

Suggested solution

No response

Additional context

No response

Package

No response

Packages version

No response

Browser

No response

Package Manager

pnpm

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions