String rangeStyle = (String) dateRangeObj[1];
String rangeRolloverStyle = (String) dateRangeObj[2];
String rangeSelectedDayStyle = (String) dateRangeObj[3];
String rangeRolloverSelectedDayStyle = (String) dateRangeObj[4];
if (dateRange instanceof SimpleDateRange) {
SimpleDateRange simpleDateRange = ((SimpleDateRange) dateRange);
Date fromDate = simpleDateRange.getFromDate();
Date toDate = simpleDateRange.getToDate();
boolean isDRValid = !(fromDate == null || toDate == null) && !fromDate.after(toDate);
if (isDRValid) {
dateRangesParam.add(new NewInstanceScript("O$.SimpleDateRange",
new NewInstanceScript("Date", fromDate.getTime()),
new NewInstanceScript("Date", toDate.getTime()),