onesine / react-tailwindcss-datepicker

Modern date range picker component for React using Tailwind 3 and dayjs. Alternative to Litepie Datepicker.
https://react-tailwindcss-datepicker.vercel.app/
MIT License
537 stars 159 forks source link

fix for inside of accordion #245

Open kangfredy opened 6 months ago

kangfredy commented 6 months ago

Hi! ๐Ÿ‘‹

Firstly, thanks for your work on this project! ๐Ÿ™‚

Today I used patch-package to patch react-tailwindcss-datepicker@1.6.6 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 0e9bfa9..d7228a7 100644
--- a/node_modules/react-tailwindcss-datepicker/dist/index.esm.js
+++ b/node_modules/react-tailwindcss-datepicker/dist/index.esm.js
@@ -1620,7 +1620,6 @@ const Input = (e) => {
                     (window.innerWidth > 767 &&
                         window.screen.height - 100 < div.getBoundingClientRect().bottom &&
                         !popoverOnDown)) {
-                    div.classList.add("bottom-full");
                     div.classList.add("mb-2.5");
                     div.classList.remove("mt-2.5");
                     arrow.classList.add("-bottom-2");
@@ -1850,7 +1849,6 @@ const Datepicker = ({ primaryColor = "blue", value = null, onChange, useRange =
             div.classList.add("translate-y-4");
             div.classList.add("opacity-0");
             setTimeout(() => {
-                div.classList.remove("bottom-full");
                 div.classList.add("hidden");
                 div.classList.add("mb-2.5");
                 div.classList.add("mt-2.5");

This issue body was partially generated by patch-package.