cancel
Showing results for 
Search instead for 
Did you mean: 

SAC date picker for the last 90 days

FxGk
Participant
0 Kudos

Hello everyone,

Is there any way in SAC to set up a date picker filter that always selects the last 90 days from the current date?

We need a date picker for an analysis because the dynamic filter and the lookback do not allow selecting a single date or a specific week in the past.

Thank you!

View Entire Topic
eeddggaarr
Contributor

hi FxGk,
if you want max. out SACs flexibility you could use a custom widget (also helpful if you want to use other time-releated characteristics like 0FISCPER)
https://github.com/SAC-Custom-Widgets/datepicker

You then have to use scripting to get the range needed.
Current date: var end = new Date();
start date: var start = new Date(end.getTime() - 90 * 24 * 60 * 60 * 1000);

push values to custom widget:
Datepicker_1.setDateVal(start);
Datepicker_1.setSecondDateVal(end);
and force refresh.

br
edgar

FxGk
Participant
0 Kudos
Thank you for your quick response. I had already looked at this custom widget, but it doesn't quite meet our requirements. For now, we have solved it with a fixed filter set for the entire year. It's a bit surprising that this option isn't available in SAC. Best regards