I am trying to set an exported function as const in a material datepicker filter with params, but when I set params, in my component, the function is launched getting the result of the function (boolean) and not the definition of the function to set my datepicker filter. Can someone help me with a solution or alternative? Thanks anyway.
Exported function:
export const daysFunction = (d: Date, days: any): boolean => {
if (days) {
return true;
} else {
return false;
}
};
In my component:
daysFunction = daysFunction(null, days); // this launch my function