Flexmonster - Localizing 'Invalid date'

by Iryna Kulchytska

HTML

<link rel="stylesheet" href="https://s3.amazonaws.com/flexmonster/2.3/demo.css">
<script src="https://code.jquery.com/jquery-2.2.4.min.js"></script>
<script src="https://s3.amazonaws.com/flexmonster/2.3/flexmonster.js"></script>

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

JavaScript

var pivot = $("#pivot-container").flexmonster({
  global: {
    localization: {
      grid: {
		    dateInvalidCaption: "no date"
  		}
    }
  },
  report: {
    dataSource: {
      dataSourceType: "json",
      data: getData()
    },
    options: {
    	datePattern: "MM/dd/yyyy",
      configuratorActive: false
    }
  },
  width: "100%",
  height: 430,
  toolbar: true,
  componentFolder: "https://s3.amazonaws.com/flexmonster/2.3/"
});

function getData() {
  return [{
    "FLIGHT_DATE": {
      caption: "Flight Date",
      type: "date string"
    },
    "Price": {
      caption: "Price",
      type: "number"
    }
  }, {
    "FLIGHT_DATE": "05/20/2016",
    "Price": 1000
  }, {
    "FLIGHT_DATE": "06/20/2016",
    "Price": 1000
  }, {
    "FLIGHT_DATE": "05/03/2016",
    "Price": 1000
  }, {
    "FLIGHT_DATE": "",
    "Price": 1000
  }];
}