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

Bug(scope): Global options are not retrieved when using the localizeDate method on the service API #816

Open
1 task done
frankswarm opened this issue Dec 5, 2024 · 0 comments

Comments

@frankswarm
Copy link

frankswarm commented Dec 5, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Which Transloco package(s) are the source of the bug?

Locale

Is this a regression?

No

Current behavior

When using the localizeDate method global options are not used. The problem is that the options parameter has a default value; thus, the getDefaultOptions method is never invoked.

Expected behavior

If no options are passed the defaults are used.

Please provide a link to a minimal reproduction of the bug, if you won't provide a link the issue won't be handled.

https://codesandbox.io/p/sandbox/frosty-payne-q55l6p

Transloco Config

provideTranslocoLocale({
      localeConfig: {
        global: {
          date: {
            timeStyle: "short",
            dateStyle: "short",
          },
        },
      },
      defaultLocale: "en-US",
      langToLocaleMapping: {
        en: "en-US",
        es: "es-ES",
      },
    }),

Browser

No response

Additional context

No response

I would like to make a pull request for this bug

Yes 🚀

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

No branches or pull requests

1 participant