@datarailsshared/dr_renderer 1.2.412 → 1.2.413

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datarailsshared/dr_renderer",
3
- "version": "1.2.412",
3
+ "version": "1.2.413",
4
4
  "description": "DataRails charts and tables renderer",
5
5
  "keywords": [
6
6
  "datarails",
@@ -8549,10 +8549,13 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
8549
8549
  const range = { datetype: "range", val: { todate: 0, fromdate: 0 } };
8550
8550
  const timeframe = highchartsRenderer.getTimeframeByFormat(format);
8551
8551
 
8552
- const isFormattedDate = format && highchartsRenderer.isDateFormat(fieldnametoFilter, format);
8553
- if (isFormattedDate || highchartsRenderer.isDate(fieldnametoFilter)) {
8552
+ const isStringValue = typeof fieldnametoFilter === 'string';
8553
+ const isFormattedDateString = isStringValue && format && highchartsRenderer.isDateFormat(fieldnametoFilter, format);
8554
+ const isDateString = isStringValue && highchartsRenderer.isDate(fieldnametoFilter);
8555
+
8556
+ if (isFormattedDateString || isDateString) {
8554
8557
  const initialDateString = fieldnametoFilter;
8555
- if (isFormattedDate) {
8558
+ if (isFormattedDateString) {
8556
8559
  fieldnametoFilter = moment_lib(fieldnametoFilter, format, true).toISOString();
8557
8560
  }
8558
8561
  const dt = new Date(fieldnametoFilter);