matheo / angular

Open Source Angular Libraries: MatDataSource, MatDatepicker
http://matheo.co/demos/
MIT License
60 stars 15 forks source link

Filter display opacity doesn't match with the filter value and click is not disabled #57

Open davideas opened 2 years ago

davideas commented 2 years ago

Bugs description:

1) Visual opacity doesn't reflect the filter value: I have a working hours filter that I copied from your example:

if (unit === 'hour') {
    // Prevent office hours from being selected.
    return hour >= 6 && hour <= 19;
}

But the hour 5 looks clickable (opacity = 1) and 19 has opacity while should be full black.

2) The Click on hours with opacity is actually triggering the view for minutes selection, while it should do nothing and remain in the view for hour selection as indeed those hours are not selectable! EDIT: Bug seems present only in Time view, while in DateTime view click is not allowed, which is ok.

Expected behavior

Opacity of the hours should respect the condition the filter is returning. The click on hours and minutes should be ignored and remains in the same view.

Screenshots

image