There is none. If you really point the prefilled intervals to
null, the following happens:
The best we can do is to remove any suggestion of an initial range:
You see this makes the selection default to the current day 00:00 - 23:00 (even when it is only 11:19 my local time at this point). This is in agreement with the example referenced in the issue ticket mentioned by @yubiuser above:
Unfortunately, there is a bug in
daterangepicker: When you simply click on
[Apply], nothing happens when you don't specify a default interval. Even though you'd expect all queries of today given what the screenshot above shows you. I traced this down into a bug in the
datetimerpcker engine. It is unexpectedly complex and difficult to fix because if drags its issue through almost a dozen different callbacks. We can, nevertheless, achieve the same thing by setting the default range.
So we have three options on the table:
- Do nothing (keeps the preselected "Last 7 Days")
- Change the default interval to something else (like the default
start - end of today as suggested above)
- Store what the user picked last time.
Mind that 3 has a drawback:
datetimepicker works with absolute time. When we store your selection of "today" now and you visit the page tomorrow, your preselected range would be "yesterday". Converting things into relative time could be tricky (but I'm not ruling this out if people really want this !).
So what do you expect?