I am using andt datepicker component. In my case, the clear icon covers calendar button.
I need to remove the clear button and allow to clear manually. (but, as far as I know, currently it can not be done). Or I need to move the clear button inside calendar modal, for instance, next to "Today" button. Is it possible?
I tried to set false value to ‘allowClear’ property. It removes clear button. But, datepicker value can not be cleared manually
2
Answers
you can look over docs here for more information: https://ant.design/components/date-picker#common-api
Here’s an example:
You can check how it looks by default: Example
You can use
renderExtraFooter
to customize the footer. Right now there’s no option to add more content withToday
button. But you can hide the currentToday
button and render your custom footer. I rendered aToday
andClear
button in datepicker footer and setshowNow
to false to hide the existing button. You can also check Extra Footer example.Here’s the complete code