Skip to content

Does not pass the locale parameter to the dateFormat function #270

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

Closed
dsolay opened this issue Aug 22, 2024 · 1 comment
Closed

Does not pass the locale parameter to the dateFormat function #270

dsolay opened this issue Aug 22, 2024 · 1 comment

Comments

@dsolay
Copy link

dsolay commented Aug 22, 2024

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch [email protected] for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/react-tailwindcss-datepicker/dist/index.esm.js b/node_modules/react-tailwindcss-datepicker/dist/index.esm.js
index ca49e83..3a353a0 100644
--- a/node_modules/react-tailwindcss-datepicker/dist/index.esm.js
+++ b/node_modules/react-tailwindcss-datepicker/dist/index.esm.js
@@ -3313,7 +3313,7 @@ const Datepicker = (props) => {
                     start: value.startDate,
                     end: value.endDate
                 });
-                setInputText(`${dateFormat(value.startDate, displayFormat)}${asSingle ? "" : ` ${separator} ${dateFormat(value.endDate, displayFormat)}`}`);
+                setInputText(`${dateFormat(value.startDate, displayFormat, i18n)}${asSingle ? "" : ` ${separator} ${dateFormat(value.endDate, displayFormat, i18n)}`}`);
             }
         }
         if (value && value.startDate === null && value.endDate === null) {

This issue body was partially generated by patch-package.

@onesine
Copy link
Owner

onesine commented Aug 23, 2024

Hi @dsolay ,

Thank you for using this package and thank you for your feedback. You are indeed right. I've just released a new version (1.7.2) that addresses your concern.

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

2 participants