fix: filter custom date select toggle (#4244)

This commit is contained in:
Anmol Singh Bhatia 2024-04-23 12:56:21 +05:30 committed by GitHub
parent 5d8c5b22e8
commit beff8536c9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 79 additions and 10 deletions

View file

@ -224,7 +224,7 @@ export const getDate = (date: string | Date | undefined | null): Date | undefine
return undefined;
}
};
export const isDate = (date: string) => {
export const isInDateFormat = (date: string) => {
const datePattern = /^\d{4}-\d{2}-\d{2}$/;
return datePattern.test(date);
};