-
Notifications
You must be signed in to change notification settings - Fork 6.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Datepicker - Cannot select dates #21120
Comments
Ah, found it - something to do with the filter. Only thing different between the usages on that page vs the others. Take out the filter and can click things again. |
Ok, premature closing because I can't figure out why the filter isn't working. The filters are working, but won't let me click any dates (i.e. as per described issue). my picker component:
Usage:
and the filter:
Visuals of filter working (Mondays only available): What is wrong with my filter setup such that I can't select any dates? |
It seems like most dates in that screenshot are disabled, either because they don't match the filter, or they're before the min or after the max dates. Could that be the reason why you can't click them? |
@crisbeto Yes, per the filter only Mondays that are >= today are available to select. So the filtering of the dates itself seems to be working, but those it has left available for selection do nothing when clicked. E.g. 23rd and 30th in the screenshot. |
@Krenom I had the exact same issue. You should probably define your filter function in your component instead of calling a function returning the filter function. This way, it fixed the issue on my side: public fromDateFilter = (dt: Date): boolean => { The way you did it was working for me on previous angular/angular material version but not anymore on version 10 |
@BUONJG You glorious person you. That has done the trick nicely, thank you very much! |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Good morning,
Apologies in advance, no reproduction available - probably not possible. This is more of an investigation enquiry as I can't find the cause of the issue.
Recently updated an old project from 8 to 11, and seems the only thing along the way left causing any issue is the date picker.
Date picker seems to be working fine initially - opens in touchUi form and can navigate months:
However, I can't click on any of the actual dates (or the years if I open that). Well, I can click on them, but it doesn't do anything (in neither Chrome nor FF).
The
td
elements do have the event listeners attached to them, and a click event is firing and being picked up, but.... nothing happens.Hits into here...
... But I have no experience with Angular under the hood and following through all of that to make it efficient to attempt such.
Any thoughts on what may be causing this behaviour that I can fix? I doubt it's an issue with material itself in some way (might be, I guess), so what could I possibly have done in this mammoth update process to have killed off date picker clicking, of all things?
My packages:
Edit: It works on other pages, but not this one. Either the one directly on the page or the one in the dialog (mat dialog) launched from that page...
The text was updated successfully, but these errors were encountered: