react-tailwindcss-datepicker icon indicating copy to clipboard operation
react-tailwindcss-datepicker copied to clipboard

Using Datepicker in modal/dialog

Open giero opened this issue 2 years ago • 6 comments
trafficstars

Hello.

is there any way to use Datepicker in modal/dialog/popover/etc such a way it will be above the container it's placed in? By default it looks like this:

https://codesandbox.io/s/happy-mopsa-8r4sgj

image

In this case Datepicker dropdown should be over the modal container to show all its content.

I will be grateful for every idea how to do this :)

P.S. I know there's overflow-hidden in Dialog.Panel class - I actually need this modal to be scrollable on y-axis overflow

giero avatar Jul 13 '23 12:07 giero

+1

wanasak avatar Jul 13 '23 17:07 wanasak

This may be related to this issue: https://github.com/onesine/react-tailwindcss-datepicker/issues/12

robmarshall avatar Jul 17 '23 10:07 robmarshall

not related to #12 , and this is needed badly

ziaulrehman40 avatar Dec 04 '23 14:12 ziaulrehman40

+1, any solution for this yet?

ian-vc avatar Jun 26 '24 08:06 ian-vc

+1

brianantonelli avatar Jun 26 '24 18:06 brianantonelli

image

Hello, I made some changes to be able to use it in modals; however, I removed the icon. But this is easy to solve by just creating a custom component. Here is how I did it:

<Datepicker i18n="pt-BR" displayFormat="DD/MM/YYYY" primaryColor={"blue"} useRange={false} asSingle={true} value={date} onChange={handleValueChange} containerClassName="z-30" toggleClassName="hidden" />

Just added containerClassName and toggleClassName

GuilhermeCamillo avatar Jun 29 '24 18:06 GuilhermeCamillo

+1

bredelman avatar Dec 20 '24 18:12 bredelman

Hi there, Sorry for the late reply

You can solve this problem by using the containerClassName property.

containerClassName ="relative w-full z-30"

Or

containerClassName ={oldClass => `${oldClass} z-30`}

Thanks to @GuilhermeCamillo for this suggestion

onesine avatar Jan 30 '25 12:01 onesine