Is it possible to remove or hide the time options from the date picker?

It is possible to modify XXXX.yyyyyyyyyyyyyyyyyyyy.js file in public/build folder that contains this list (for example, 4570.87a4acc6d9144f9ee50a.js for Grafana 11.0.0).

Search for the following text and remove periods that you don’t need.

const t=[{from:"now-5m",to:"now",display:"Last 5 minutes"},{from:"now-15m",to:"now",display:"Last 15 minutes"},{from:"now-30m",to:"now",display:"Last 30 minutes"},{from:"now-1h",to:"now",display:"Last 1 hour"},{from:"now-3h",to:"now",display:"Last 3 hours"},{from:"now-6h",to:"now",display:"Last 6 hours"},{from:"now-12h",to:"now",display:"Last 12 hours"},{from:"now-24h",to:"now",display:"Last 24 hours"},{from:"now-2d",to:"now",display:"Last 2 days"}...

Or modify source code and compile custom Grafana version

1 Like