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

Able to hide/disable clear button (need a allowClear prop)

Open TrustyTechSG opened this issue 2 years ago • 4 comments

Hi there, for example like job reschedule use case, we do not want user be able to clear the current schedule date, only can do reschedule. So need able to disable or hide the XMarkIcon clear button.

TrustyTechSG avatar May 19 '23 02:05 TrustyTechSG

hi there, any update about this? this is very useful feature

kevingio-julo avatar Jun 22 '23 10:06 kevingio-julo

Agreed this would be a great feature!

khou22 avatar Jul 19 '23 18:07 khou22

For what it's worth, I was able to accomplish something similar using the following...

<Datepicker
  toggleClassName="hidden"
   ...
/>

This of course will also hide the calendar icon, but that may be ok for your purposes.

bradbyte avatar Jul 25 '23 13:07 bradbyte

For what it's worth, I was able to accomplish something similar using the following...

<Datepicker
  toggleClassName="hidden"
   ...
/>

This of course will also hide the calendar icon, but that may be ok for your purposes.

Great suggestion, thanks @bradbyte! That did the trick for my use case.

Screenshot 2023-07-25 at 2 22 52 PM

khou22 avatar Jul 25 '23 21:07 khou22