Dashboards & Visualizations

Date format still US in TimeRangePicker Module (using web GB)

srw46
Path Finder

Hello all,

My TimeRangePicker module still displays the date in US format when selecting a custom time despite me using the /en-GB/ locale in the URL and despite all others formats showing GB format.

Is this an issue unique to me? If it is, what could be causing it and if it's not, can I alter this to GB format somehow?

Thanks

Tags (1)
1 Solution

WayneClarke
Explorer

Found the bug ref (the bug reference for your time-picker problem is Ticket SPL-35748 )

I have already submitted a bug for this last year I am trying to find the bug reference. It has been an issue for a while.

I found a solution but this will make the timepicker UK day/month for everyone not recommend for production.

I haven`t tested this on 4.2

Each time you upgrade you will need to find the files and then patch them.

jquery-ui-1.7.2.custom.min.js
TimeRangePicker.js

jquery-ui-1.7.2.custom.min.js

dateFormat:"mm/dd/yy" in the Datepicker function should be dateFormat:"dd/mm/yy” I didn’t see any locality checking

TimeRangePicker.js

From

var defaultDate = new Date(); // latest date defaults to today (at 00:00:00.000)

$('.latestDate', this._customDateTimePopup).val((parseInt(defaultDate.getMonth())+1) + '/' + defaultDate.getDate() + '/' + defaultDate.getFullYear());
defaultDate.setDate(defaultDate.getDate()-1); // earliest defaults to yesterday (at 00:00:00.000)
$('.earliestDate', this._customDateTimePopup).val((parseInt(defaultDate.getMonth())+1) + '/' + defaultDate.getDate() + '/' + defaultDate.getFullYear());

To

var defaultDate = new Date(); // latest date defaults to today (at 00:00:00.000)

$('.latestDate', this._customDateTimePopup).val(defaultDate.getDate() + '/' + (parseInt(defaultDate.getMonth())+1) + '/' + defaultDate.getFullYear());
defaultDate.setDate(defaultDate.getDate()-1); // earliest defaults to yesterday (at 00:00:00.000)
$('.earliestDate', this._customDateTimePopup).val(defaultDate.getDate() + '/' + (parseInt(defaultDate.getMonth())+1) + '/' + defaultDate.getFullYear());

View solution in original post

WayneClarke
Explorer

Hello srw46

It may increase the profile of the issue if you report it as well, keeps it on there radar as well.

"Unfortunately I don't think I'll get such direct edits through our change process so we'll have to deal with the US format for now." -- Same for me.

srw46
Path Finder

Thank you, WayneClarke.

Unfortunately I don't think I'll get such direct edits through our change process so we'll have to deal with the US format for now.

Is there anything I can do to expedite the bug being addressed, like also submitting etc?

EDIT : I've submitted the issue. It was appended to an 'enhancement request' but that seems debatable to me! The advertised feature is that changing locale should change the format across the board. It's obviously an oversight and should not be bundled in with the 'feature wish list'.

When's Splunk Live? 😄

0 Karma

WayneClarke
Explorer

Found the bug ref (the bug reference for your time-picker problem is Ticket SPL-35748 )

I have already submitted a bug for this last year I am trying to find the bug reference. It has been an issue for a while.

I found a solution but this will make the timepicker UK day/month for everyone not recommend for production.

I haven`t tested this on 4.2

Each time you upgrade you will need to find the files and then patch them.

jquery-ui-1.7.2.custom.min.js
TimeRangePicker.js

jquery-ui-1.7.2.custom.min.js

dateFormat:"mm/dd/yy" in the Datepicker function should be dateFormat:"dd/mm/yy” I didn’t see any locality checking

TimeRangePicker.js

From

var defaultDate = new Date(); // latest date defaults to today (at 00:00:00.000)

$('.latestDate', this._customDateTimePopup).val((parseInt(defaultDate.getMonth())+1) + '/' + defaultDate.getDate() + '/' + defaultDate.getFullYear());
defaultDate.setDate(defaultDate.getDate()-1); // earliest defaults to yesterday (at 00:00:00.000)
$('.earliestDate', this._customDateTimePopup).val((parseInt(defaultDate.getMonth())+1) + '/' + defaultDate.getDate() + '/' + defaultDate.getFullYear());

To

var defaultDate = new Date(); // latest date defaults to today (at 00:00:00.000)

$('.latestDate', this._customDateTimePopup).val(defaultDate.getDate() + '/' + (parseInt(defaultDate.getMonth())+1) + '/' + defaultDate.getFullYear());
defaultDate.setDate(defaultDate.getDate()-1); // earliest defaults to yesterday (at 00:00:00.000)
$('.earliestDate', this._customDateTimePopup).val(defaultDate.getDate() + '/' + (parseInt(defaultDate.getMonth())+1) + '/' + defaultDate.getFullYear());

srw46
Path Finder

Anybody else experiencing this issue? Should I submit it as a bug?

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

May 2026 Splunk Expert Sessions: Security & Observability

Level Up Your Operations: May 2026 Splunk Expert Sessions Whether you are refining your security posture or ...

Network to App: Observability Unlocked [May & June Series]

In today’s digital landscape, your environment is no longer confined to the data center. It spans complex ...

SPL2 Deep Dives, AppDynamics Integrations, SAML Made Simple and Much More on Splunk ...

Splunk Lantern is Splunk’s customer success center that provides practical guidance from Splunk experts on key ...