Add newer_than_absolute_date_no_time operator
Summary: Doc: https://docs.google.com/document/d/1miofxds9DJgWScj0zFyBbdpRH5Rj0T9FqiCapof5-vU/edit#heading=h.pg8svtdjlx7 Reviewed By: lblasa Differential Revision: D49232773 fbshipit-source-id: 96ab2d0d5cc804c1fcf1e64475fd68de60fa797a
This commit is contained in:
committed by
Facebook GitHub Bot
parent
ad6b3ed4f9
commit
7a6d895aa8
@@ -135,6 +135,12 @@ export const dataTablePowerSearchOperators = {
|
|||||||
valueType: 'ABSOLUTE_DATE',
|
valueType: 'ABSOLUTE_DATE',
|
||||||
dateOnly: false,
|
dateOnly: false,
|
||||||
}),
|
}),
|
||||||
|
newer_than_absolute_date_no_time: () => ({
|
||||||
|
key: 'newer_than_absolute_date_no_time',
|
||||||
|
label: 'is after the day',
|
||||||
|
valueType: 'ABSOLUTE_DATE',
|
||||||
|
dateOnly: true,
|
||||||
|
}),
|
||||||
} satisfies {
|
} satisfies {
|
||||||
[key: string]: (...args: any[]) => OperatorConfig;
|
[key: string]: (...args: any[]) => OperatorConfig;
|
||||||
};
|
};
|
||||||
@@ -205,4 +211,12 @@ export const dataTablePowerSearchOperatorProcessorConfig = {
|
|||||||
const valueNormalized = dayjs(value);
|
const valueNormalized = dayjs(value);
|
||||||
return valueNormalized.isAfter(searchValue);
|
return valueNormalized.isAfter(searchValue);
|
||||||
},
|
},
|
||||||
|
newer_than_absolute_date_no_time: (
|
||||||
|
_operator,
|
||||||
|
searchValue: Date,
|
||||||
|
value: any,
|
||||||
|
) => {
|
||||||
|
const valueNormalized = dayjs(value);
|
||||||
|
return valueNormalized.isAfter(searchValue);
|
||||||
|
},
|
||||||
} satisfies PowerSearchOperatorProcessorConfig;
|
} satisfies PowerSearchOperatorProcessorConfig;
|
||||||
|
|||||||
Reference in New Issue
Block a user