Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
valueBuilder (row, key) {
if (!StringUtils.hasEmpty(row.datetimerangeStart, row.datetimerangeEnd)) {
row.datetimerange = [new Date(row.datetimerangeStart), new Date(row.datetimerangeEnd)]
}
},
valueResolve (row, key) {
valueBuilder (row, key) {
if (!StringUtils.hasEmpty(row.daterangeStart, row.daterangeEnd)) {
row.daterange = [new Date(row.daterangeStart), new Date(row.daterangeEnd)]
}
},
valueResolve (row, key) {
valueResolve (row, key) {
if (row.daterange != null && !StringUtils.hasEmpty(row.daterange)) {
row.daterangeStart = row.daterange[0].getTime()
row.daterangeEnd = row.daterange[1].getTime()
} else {
row.daterangeStart = null
row.daterangeEnd = null
}
}
},
valueResolve (row, key) {
if (row.datetimerange != null && !StringUtils.hasEmpty(row.datetimerange)) {
row.datetimerangeStart = row.datetimerange[0].getTime()
row.datetimerangeEnd = row.datetimerange[1].getTime()
} else {
row.datetimerangeStart = null
row.datetimerangeEnd = null
}
}
}