Skip to content

Commit

Permalink
update date query builder
Browse files Browse the repository at this point in the history
  • Loading branch information
usavkov-epam committed Nov 8, 2024
1 parent 5a5f239 commit 939372e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/AcqList/utils/queryUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const buildArrayFieldQuery = (filterKey, filterValue) => {
};

export const buildDateRangeQuery = (filterKey, filterValue) => {
const [from, to] = filterValue.split(':');
const [from, to] = (Array.isArray(filterValue) ? filterValue.toString() : filterValue).split(':');
const start = moment(from).startOf('day').format(DATE_RANGE_FILTER_FORMAT);
const end = moment(to).endOf('day').format(DATE_RANGE_FILTER_FORMAT);

Expand All @@ -47,7 +47,7 @@ export const buildNumberRangeQuery = (filterKey, filterValue) => {
};

export const buildDateTimeRangeQuery = (filterKey, filterValue) => {
const [from, to] = filterValue.split(':');
const [from, to] = (Array.isArray(filterValue) ? filterValue.toString() : filterValue).split(':');
const start = moment(from).startOf('day').utc().format(DATE_RANGE_FILTER_FORMAT);
const end = moment(to).endOf('day').utc().format(DATE_RANGE_FILTER_FORMAT);

Expand Down

0 comments on commit 939372e

Please sign in to comment.