# Change timepicker:timeDefaults to latest event date in the data

**URL:** https://discuss.elastic.co/t/change-timepicker-timedefaults-to-latest-event-date-in-the-data/267104
**Category:** Kibana
**Created:** [March 12, 2021, 3:54pm UTC](https://discuss.elastic.co/t/change-timepicker-timedefaults-to-latest-event-date-in-the-data/267104 "2021-03-12T15:54:57Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Sandeep-Singh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sandeep-singh/32/85466_2.png) [@Sandeep-Singh](https://discuss.elastic.co/u/Sandeep-Singh)
#### Post date: [March 12, 2021, 3:54pm UTC](https://discuss.elastic.co/t/change-timepicker-timedefaults-to-latest-event-date-in-the-data/267104/1 "2021-03-12T15:54:57Z")

</div>

Dear Community,

I am trying to change 'timepicker:timeDefaults' setting value to something so that every time user logs in to the application, the time selection shows the date range from today till the last date data was ingested/fed to application.  
Issue faced is when time default is set to last 15 minutes and data is one day old, then on initial load user see nothing on the dashboard, until user changes the time range.

Is this possible to set 'timepicker:timeDefaults' to show latest event time(which can be a day/2days/a week old data), so that user do not have to change the time range on initial load and dashboard always have some data to display.

![image](https://us1.discourse-cdn.com/elastic/original/3X/a/d/ad5c4bffb7facc6fb5df6ae6a1b6275e22e7e28c.png)

Thank you!

---

<div class="post-metadata">

### Author: ![tsullivan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tsullivan/32/31077_2.png) [@tsullivan](https://discuss.elastic.co/u/tsullivan)
#### Post date: [March 17, 2021, 5:04pm UTC](https://discuss.elastic.co/t/change-timepicker-timedefaults-to-latest-event-date-in-the-data/267104/2 "2021-03-17T17:04:29Z")

</div>

> [@Sandeep-Singh](#):
>
> Is this possible to set 'timepicker:timeDefaults' to show latest event time(which can be a day/2days/a week old data), so that user do not have to change the time range on initial load and dashboard always have some data to display.

A solution to do this would require having a custom script/process search the data you're interested in, find the time of the last data, and then programatically set the timepicker default therefrom.

That isn't something that can be provided out of the box, because the process needs:

1. To know which of your indices is relevant
2. To have security privilege to read your index data

---

<div class="post-metadata">

### Author: ![Sandeep-Singh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sandeep-singh/32/85466_2.png) [@Sandeep-Singh](https://discuss.elastic.co/u/Sandeep-Singh)
#### Post date: [March 17, 2021, 7:05pm UTC](https://discuss.elastic.co/t/change-timepicker-timedefaults-to-latest-event-date-in-the-data/267104/3 "2021-03-17T19:05:16Z")

</div>

Thank you for the explanation, I understand why it is restricted.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [April 14, 2021, 7:06pm UTC](https://discuss.elastic.co/t/change-timepicker-timedefaults-to-latest-event-date-in-the-data/267104/4 "2021-04-14T19:06:05Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
