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

range picker of months, range picker of years, year picker, format value like reactdatepicker.com & add className props for customize tailwindcss class

Open muh-hizbe opened this issue 3 years ago • 8 comments

muh-hizbe avatar Nov 29 '22 09:11 muh-hizbe

Thank you @muh-hizbe for the feature requests. It will be processed very soon.

onesine avatar Nov 29 '22 12:11 onesine

className props would be awesome to customize design (like margins and padding for my usage)

Edit : I had not seen the package had been updated with props like inputClassName and containerClassName

I tested it, it's almost perfect but there's a little problem when adding classes already present in the base component. They might not override the base class because "the order that the classes appear in the class attribute doesn't matter, the rule that comes later in the CSS stylesheets wins". (Problem is described here : https://dev.to/diogoko/overriding-tailwind-classes-in-react-4po3).

For example, if you override py-2.5 from the base input classes with py-1.5 using inputClassName prop, py-2.5 will still be applied as py-2.5 comes after py-1.5 in the tailwind CSS stylesheet.

The solution proposed in this article is to use a utility functionality to efficiently merge tailwind classes like https://github.com/dcastil/tailwind-merge.

Example updated code with input classes : return twMerge('relative transition-all duration-300 py-2.5 pl-4 pr-14 w-full border-gray-300 dark:bg-slate-800 dark:text-white/80 dark:border-slate-600 rounded-lg tracking-wide font-light text-sm placeholder-gray-400 bg-white focus:ring disabled:opacity-40 disabled:cursor-not-allowed ${border} ${ring}', classNameOverload);

pbell23 avatar Dec 13 '22 15:12 pbell23

Hello @pbell23 👋

Sorry for the delay.

Thank you very much for your feedback which I really appreciate. I really like your explanation of the problem and also the package that you have just made me discover.

Thanks to you, I just learned something. I will correct the problem very soon.

PR's are always welcome.

Feel free to contribute.

onesine avatar Dec 16 '22 10:12 onesine

I really like the package and would be super interested in the possibility to choose month only.

danielweil avatar Dec 16 '22 14:12 danielweil

Hello @danielweil 👋

Thank you for your feedback.

Please be reassured. We will do our best to answer your request as soon as possible.

onesine avatar Dec 16 '22 14:12 onesine

Is this still not available? Would also like to have a monthly only option.

awclinintell avatar Aug 16 '23 13:08 awclinintell

Still not available for month and year picker?

prime-voucher avatar Oct 31 '23 08:10 prime-voucher

Still waiting for the year picker and month picker features as it is available in every other date-picker and makes work simpler and faster.

parth1605 avatar Apr 15 '24 10:04 parth1605