Change label for date range filter from "All Time"

  • 1
  • Question
  • Updated 2 years ago
  • (Edited)
I would like to change the wording for the table date range filter when the filter is off. I understand I can create a label that will display above the filter however that will not fulfill my need. I need the "off" label to read "Date Range".



Use Case:
On the model there is a default on condition that defaults a date field to "This Month". When the date range filter is "off" it states "All Time" this is misleading to the user. It is not showing all time but just data for this month.

Possible Solution:
In the console I see the div that sets this label. But I don't how to access that to change the wording from "All Time" to "Date Range". Can anyone point me in the right direction? Thank you!



Code So Far (prints in console but doesn't change the label):
var element = arguments[0],    
$ = skuid.$, x = document.getElementsByClassName("nx-actionselect-text"); x.innerHTML = "Date Range"; console.log(x.innerHTML);
Photo of Tami Lust

Tami Lust

  • 5,280 Points 5k badge 2x thumb

Posted 2 years ago

  • 1
Photo of Tami Lust

Tami Lust

  • 5,280 Points 5k badge 2x thumb
So I have the label changing but I can't get it on page load. I tried wrapping it in a function but it threw an error. I have this set up as a in-line snippet.

$(document.body).one('pageload',function() {
<br>
  // My code here.
<br>
});
Working code on refresh:
var element = arguments[0],    
          $ = skuid.$,
x = document.getElementsByClassName("nx-actionselect-text")[0];
console.log(x);
x.innerHTML = "Date Range";
console.log(x.innerHTML);