app-datepicker
Version:
Google Material Design based date picker built with lit
8 lines (7 loc) • 342 B
JavaScript
export function isInCurrentMonth(targetDate, sourceDate) {
const targetDateFy = targetDate.getUTCFullYear();
const targetDateM = targetDate.getUTCMonth();
const sourceDateFY = sourceDate.getUTCFullYear();
const sourceDateM = sourceDate.getUTCMonth();
return targetDateFy === sourceDateFY && targetDateM === sourceDateM;
}