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!

Data Drivers: How We're Streaming Real-Time F1 Telemetry Directly into Splunk ...

Data Drivers: Every Lap Tells a Story The Spectacle Two F1 racing sims go head-to-head on the .conf26 show ...

Data Management Digest – July 2026

  Welcome to the July 2026 edition of Data Management Digest! As your trusted partner in data innovation, the ...

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...