- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2023 05:48 AM
Hello, I've created a <sp-date-picker> using most of the code from this: Solved: Re: Date Picker in widget is not showing correct d... - ServiceNow Community
The problem is that the calendar has a hover over tooltip that reads "Show Calendar for {0}". How do I get rid of this entirely or change it to say something else?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2023 06:33 AM
Hi jpeterson4,
you can use jquery to change the title.
$(document).on('mouseenter', "button[aria-label='Show Calendar for {0}']", function() {
$("button[aria-label='Show Calendar for {0}']").attr('title', 'NEW_TITLE').tooltip('fixTitle').tooltip('show');
});
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2023 02:59 AM - edited 10-19-2023 03:01 AM
Hi @jpeterson4 @Nguyen Vuong Ph @Vaibhav127 @
Can you tell me where I can write the jQuery code?
Thank you
Ramji
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2023 03:13 AM
You would put this into the client script within the widget that has the directive you are looking to adjust.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2024 03:02 AM
Please do not use DOM manipulation as this is not best, or even good practice.
You can find the angular module here: <yourinstance>.service-now.com/scripts/app.$sp/directive.spDatePicker.js
Here you can see, the {0} is replaced by scope.field.label
In your HTML of sp-date-picker, you have a property called field (usually an angular object, the example its c.fromDate). If you give the c.fromDate object the label property, you can control whats entered in {0}