Calendar in time filter from Monday to Sunday instead of Sunday to Saturday


(Sasauz) #1

Is it possible to change the calendar format in absolute time filter, so that it will be show weeks from Monday to Sunday instead of Sunday to Saturday?


(Tim Sullivan) #2

I don't believe there is any config setting for this, so the only way is probably to modify the Javascript source code.

It looks like the setting is controlled the startingDay field in this object:

Depending on your version of Kibana, that file might be somewhere else in the repo.

If you change that 0 to a 1, then the date picker calendars will show Monday as the first day of the week. I have tested it and took this screenshot:


(Sasauz) #3

Thank you Tim for your answer. I'm using Kibana 4.4 and on another server 4.5.2. You are right that in older versions it is somewhere else. I have try to find this variable but I didn't find it. :frowning: I think the variable in old versions (4.X) is not startingDay. Do you know where to find it in Kibana 4.4 or 4.5.2?


(Tim Sullivan) #4

In Kibana 4.x it's a little different.x because the datepicker module is external, not in the Kibana source.

The startingDay option is in ./node_modules/@spalger/angular-bootstrap/ui-bootstrap-tpls.js line 1004. That looks to be the same for Kibana 4.4.x and Kibana 4.5.x.

After editing that line, you'll need to stop Kibana, run rm -rf optimize in the Kibana home directory, and then restart Kibana.

I think this idea would make a good feature request for Kibana 5.x. We could probably add this as an Advanced Settings option. Would you mind creating that in our issues page: https://github.com/elastic/kibana/issues? if you do, please add the enhancement label.


(Sasauz) #5

Thank you very much!

It works! I have had only one problem after I delete the optimize directory and have try to start the kibana, there was an error:


I solved it with copy of original optimize-directory from package(zip-file) in the Kibana home directory.

I have create the issue, but I cannot add the label :frowning: Here is the issue https://github.com/elastic/kibana/issues/7730


(system) #6