fix date search

This commit is contained in:
Abhinav-grd 2021-06-15 22:27:00 +05:30
parent c0d462fa37
commit 0ec3b93f92

View file

@ -25,10 +25,10 @@ export const isSameDay = (baseDate: DateValue) => (compareDate: Date) => {
if (baseDate.month || baseDate.month === 0) {
same = baseDate.month === compareDate.getMonth();
}
if (baseDate.date) {
if (same && baseDate.date) {
same = baseDate.date === compareDate.getDate();
}
if (baseDate.year) {
if (same && baseDate.year) {
same = baseDate.year === compareDate.getFullYear();
}