Add an offset to the start of the week in the filter's date picker

Options

by Flexmonster Pivot Table

HTML

<script src="https://cdn.flexmonster.com/flexmonster.js"></script>

<div>
  <p>
    Using the
    <a
      target="_blank"
      href="https://www.flexmonster.com/api/options-object/#filter-weekoffset"
      >filter.weekOffset</a
    > option (line 19 in the JavaScript box), you can set the number of days to be
    added to the start of the week (Sunday) in the filter's date picker.
  </p>
  <p>
    Note that the <code>filter.weekOffset</code> adjusts the first day of the
    week only in the date picker.
  </p>
</div>

<div id="pivot-container"></div>

CSS

@import url(https://cdn.flexmonster.com/assets/jsfiddle-styles.css);

JavaScript

const pivot = new Flexmonster({
  container: "pivot-container",
  componentFolder: "https://cdn.flexmonster.com/",
  height: 400,
  report: {
    dataSource: {
      type: "api",
      url: "https://olap.flexmonster.com:9500",
      index: "dateWithTime",
      mapping: {
        "D": {
          type: "datetime",
          caption: "Date"
        }
      },
    },
    options: {
      filter: {
        weekOffset: 3
      }
    },
    slice: {
      rows: [{
        uniqueName: "D",
        filter: {
          query: {
            after: "2019-03-08T00:00:00"
          }
        }
      }],
      columns: [{
        uniqueName: "[Measures]"
      }],
      measures: [{
        uniqueName: "Price",
        aggregation: "sum"
      }]
    },
  },
  reportcomplete: function() {
    pivot.openFilter("D");
  }
});