Browse Source

fix(nocodb): format date string if comparison_sub_op is not null

pull/5185/head
Wing-Kam Wong 2 years ago
parent
commit
8de8003eca
  1. 5
      packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/conditionV2.ts

5
packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/conditionV2.ts

@ -316,7 +316,10 @@ const parseConditionV2 = async (
break;
}
if (filter.comparison_sub_op !== 'exact_date') {
if (
filter.comparison_sub_op &&
filter.comparison_sub_op !== 'exact_date'
) {
// val for exact_date is not a dayjs object
val = val.format(dateFormat).toString();
val = column.uidt === UITypes.Date ? val.substring(0, 10) : val;

Loading…
Cancel
Save