Input widget with date type - clear in calendar not working
Question
Application Type
Reactive

Hi, I have a normal form with input - date type to enter a date. In UI, it opens a calendar as below, the "Today" works well but the "Clear" - nothing happens. Can anybody help, how to clear the date with this date input. This is no date picker, just a normal input with date type. Screenshots below

Input

The calendar that opens

Hi Pavithra,

I've been looking for a solution to give you, but since that calendar is a display of the HTML5 date control  , it depends on the browser. It doesn't even appear on the inspect, so it's really hard to test some CSS.

There's no direct solution "1 fits all". You can check this post for further info: https://stackoverflow.com/questions/62989691/how-to-remove-today-from-calendar-footer-of-input-type-date

If you want more control on the calendar, you should use a date picker to help you.

HI Pavithra ,

Make the mandatory property to False


Best Regards

Devendra


Hi Devendra,

Is it that simple ? Thanks, it worked but I need this date as a mandatory parameter that the user must fill. Its an overhead to check again if it is filled.

Or is there a way to remove this Clear button. I read in community, to remove Today button with css class. But tried to find class for this clear button, could not find it.


Regards

Pavithra

Hi Pavithra,

I've been looking for a solution to give you, but since that calendar is a display of the HTML5 date control  , it depends on the browser. It doesn't even appear on the inspect, so it's really hard to test some CSS.

There's no direct solution "1 fits all". You can check this post for further info: https://stackoverflow.com/questions/62989691/how-to-remove-today-from-calendar-footer-of-input-type-date

If you want more control on the calendar, you should use a date picker to help you.

Hi Pavithra,

As suggested by Laura better use Date Picker control it would be hard to customize the inbuilt HTML 5 Control and it would need to customization for all browsers. 

Best Regards

Devendra

I have used it in a application.

Hi All,

Thanks for your suggestions. Yes, I have used datepickers before, just that it needs extra effort of text to date conversion and vice versa, the effort I dont want to spend for all my input fields with date inputs. I find the normal date input field in all ways easier than datepicker, except for this clear button. We did try to "inspect" with developer tools, to find the class related to clear, but i could not find its relevant class. 

Thanks

Pavithra

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.