Add older_than_absolute_date_no_time operator
Summary: Doc: https://docs.google.com/document/d/1miofxds9DJgWScj0zFyBbdpRH5Rj0T9FqiCapof5-vU/edit#heading=h.pg8svtdjlx7 Reviewed By: antonk52 Differential Revision: D49232776 fbshipit-source-id: 1083c277c78cd6eb2bae069966a9de290aa71930
This commit is contained in:
committed by
Facebook GitHub Bot
parent
ea1d2e9813
commit
7d90493148
@@ -147,6 +147,12 @@ export const dataTablePowerSearchOperators = {
|
||||
valueType: 'ABSOLUTE_DATE',
|
||||
dateOnly: false,
|
||||
}),
|
||||
older_than_absolute_date_no_time: () => ({
|
||||
key: 'older_than_absolute_date_no_time',
|
||||
label: 'is before the day',
|
||||
valueType: 'ABSOLUTE_DATE',
|
||||
dateOnly: true,
|
||||
}),
|
||||
} satisfies {
|
||||
[key: string]: (...args: any[]) => OperatorConfig;
|
||||
};
|
||||
@@ -229,4 +235,12 @@ export const dataTablePowerSearchOperatorProcessorConfig = {
|
||||
const valueNormalized = dayjs(value);
|
||||
return valueNormalized.isBefore(searchValue);
|
||||
},
|
||||
older_than_absolute_date_no_time: (
|
||||
_operator,
|
||||
searchValue: Date,
|
||||
value: any,
|
||||
) => {
|
||||
const valueNormalized = dayjs(value);
|
||||
return valueNormalized.isBefore(searchValue);
|
||||
},
|
||||
} satisfies PowerSearchOperatorProcessorConfig;
|
||||
|
||||
Reference in New Issue
Block a user