As far as I can tell, the only options for setting the upper bound of the 
DateFilterControl dynamically with smart date parsing are:

- last [period]
- next [period]
- today, yesterday, tomorrow

Selecting last [period] sets the upper bound as the beginning of that period, 
e.g. if today is Sept. 18 and I set the upper bound as "last month", the upper 
bound will be August 1, i.e. the beginning of last month, which makes sense 
semantically since the data goes up until "last month".

However, there is no way to set the upper bound as the _current period_ as far 
as I can tell, and this is important for creating visualizations that only 
include full weeks/months/etc. of data. 

Example: If today is september 18 and I want to include data up until Sept 1, 
i.e. the last full month of data, I need to be able to enter "This month" as 
the upper bound, which sets the time frame as < Sept 1.

I'd be happy to submit a PR to add a "This x" option to the 
[DateFilterControl](https://github.com/apache/incubator-superset/blob/6c9be9d67bc73893055f989915ec4a43e7e848c1/superset/assets/src/explore/components/controls/DateFilterControl.jsx),
 but I wanted to make sure I wasn't missing something first. 

- [x] I have checked the superset logs for python stacktraces and included it 
here as text if any
- [x] I have reproduced the issue with at least the latest released version of 
superset
- [x] I have checked the issue tracker for the same issue and I haven't found 
one similar


[ Full content available at: 
https://github.com/apache/incubator-superset/issues/5920 ]
This message was relayed via gitbox.apache.org for [email protected]

Reply via email to