How to remove Ok/Cancel button in DatePicker?

MiłoszT
Tera Contributor

Hi, 
I cannot find a way to remove "Cancel" and "Ok" buttons from my form Datepicker.

MioszT_0-1762520225929.png

I see that in UI Builder component it is possible to remove those by deselecting "Show default footer actions":

MioszT_1-1762520237539.pngMioszT_2-1762520244001.png

But when editing form datepicker in FormBuilder I do not see any customization options.

Is there a way to make it so I do not need to first select date and then confirm it?
Thank you

 

2 REPLIES 2

AnjalPDijo
Mega Guru

Hi @MiłoszT, please note the following:

In UI Builder, you can remove the OK/Cancel buttons from the Date Picker by deselecting “Show default footer actions” in the component settings. This works because UI Builder uses configurable Now Experience components.

However, in Form Builder, the Date Picker is part of the standard platform form field and does not currently provide an option to hide these buttons. If you want this behavior, you would need to:

  • Use UI Builder for the form instead of Form Builder, or
  • Create a custom UI component for the date picker.

For more details, please refer to this discussion: https://www.servicenow.com/community/developer-forum/how-to-remove-ok-and-cancel-button-from-calenda... 

Regards,
Anjal

Ankur Bawiskar
Tera Patron
Tera Patron

@MiłoszT 

is the 1st screenshot from portal form?

But why to remove?

how will users then ensure the value they select actually gets set in that?

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader