Again, void negation - 'disabled': isDateSelectable(yearMoment) or 'disabled': allowSelection(yearMoment) - you know the granularity from the current view value if you need it - no need to repeat view values like 'year', etc.