disableDayFn is not working as expected

Good evening! As for title, I’m working with MaterializeCSS (without jQuery because I’m in ReactJS), and I’m trying to write a function to pass to disableDayFn, such that every weekday but Mondays and Thursdays are DISABLED. I wrote this

M.Datepicker.init(datepicker, {
            disableWeekends: true,
            autoClose: true,
            firstDay: 1,
            yearRange: 1,
            showDaysInNextAndPreviousMonths: true,
            showClearBtn: true,
            defaultDate: (() => Date.now()),
            disableDayFn: ((callbackDay) => {
                let today = new Date();
                today = Date.now();
                let day = new Date();
                if(callbackDay < today && (day.getDay() != 1 || day.getDay() != 4)) {
                    return true;
                } else {
                    return false;
                }
            })
        });

but it’s not working. Can anybody address the issue?

Turns out the issue was with data types. I actually needed the date of callback parameter, not the current date, so the code fixed code is

let currentDate = new Date();
M.Datepicker.init(datepicker, {
  minDate: currentDate,
  disableDayFn: ((callbackDay) => {
                if(callbackDay.getDay() == 1 || callbackDay.getDay() == 4) {
                    return false;
                } else {
                    return true;
                }
            })

I leave this for reference.