This is what I'm using right now for the date picker bar since my pages are in root level. It works well enough for now, but the customer is wanting different presets. They were wanting more presets in the drop down, but I think really a couple of buttons will do as they don't view months or years out. I searched and found few threads to create buttons, but did not see one with a custom range. I did see that the update interval rate can be varied depending on the range size, which was what I was needing to do to solve my max point value reached deal with the trends.
In short, I would like to leave the current date picker and have a "Last 1 day", "Last 2 days", "Last 3 days" and "Last 1 week" buttons. I have an idea how to add the Last 1 day and Last 1 week from previous posts since they are existing presets, but no idea on the 2 and 3 days.
<div layout="row" layout-xs="column"> <md-input-container flex=""> <label>Preset</label> <ma-date-range-picker from="from" to="to" preset="LAST_1_DAYS" update-interval="5 seconds"></ma-date-range-picker> </md-input-container> <md-input-container flex=""> <label>From date</label> <ma-date-picker ng-model="from"></ma-date-picker> </md-input-container> <md-input-container flex=""> <label>To date</label> <ma-date-picker ng-model="to"></ma-date-picker> </md-input-container> </div>