fix date search
This commit is contained in:
parent
c0d462fa37
commit
0ec3b93f92
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue