Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible bugfix KNOWAGE-8374 #910

Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { getLocale } from '@/helpers/commons/localeHelper'
import deepcopy from 'deepcopy'
import moment from 'moment'

Expand Down Expand Up @@ -42,13 +43,9 @@ function checkIfMultivalueDriverContainsCrossNavigationValue(tempParam: any, cro
}

function getValidDate(value: string) {
let momentDate = moment(deepcopy(value))
let momentDate = moment(deepcopy(value)).locale(getLocale())
if (momentDate.isValid()) return momentDate.toDate()
const validFormats = ['DD/MM/YYYY', 'DD/MM/YYYY HH:mm:ss.SSS']
for (let i = 0; i < validFormats.length; i++) {
momentDate = moment(deepcopy(value), validFormats[i])
if (momentDate.isValid()) return momentDate.toDate()
}

return ''
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const removeUnusedVisibleColumnsFromModel = (treeListTypeModel) => {
if (!treeListTypeModel || !treeListTypeModel['VISIBLE-COLUMNS']) return
if (!treeListTypeModel || !treeListTypeModel['VISIBLE-COLUMNS'] || !treeListTypeModel.STMT) return
const visibleColumns = treeListTypeModel['VISIBLE-COLUMNS'].split(',')
const filteredColumns = visibleColumns.filter((column: string) => treeListTypeModel.STMT.includes(column.trim()))
treeListTypeModel['VISIBLE-COLUMNS'] = filteredColumns.join(',')
Expand Down
Loading