-
Notifications
You must be signed in to change notification settings - Fork 139
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 and Select immediately closing on open #444
Comments
Got the exact same issue only on Google Chrome though Firefox seems to work fine.... |
I just tried and I can confirm what jeroen says. In firefox all seems to be fine. |
It looks like this is a problem in Materializecss / pickadate.js check this thread for a quick fix: |
This is a big problem. The same with me of all my projects! :( |
This is a solution for SELECT component:
|
If I do this, won't this give problems whenever I deploy it on a server that does npm install to restore packages? |
You are absolutely right, this is a temporary solution! for a definitely solution its necessary a new version of materializecss. Or angular2-materialize compatibility with new version of materializecss 1.0 |
There should be a fix for this otherwise i need to take out materialize out of all my projects. |
Yea, this is quite annoying. If you go to the actual website where they have their demos, you see the exact same behavior: http://archives.materializecss.com/0.100.2/forms.html The fix above came with some improvement but it's not a real fix. |
I'm having the same issue. The first time I click if I hold it will stay open, but the next time I click it doesn't open until after I release the click. It seems to alternate between these 2 states: press and hold to keep open and click to open. |
Solution for materializecss calendar opening & closing immediatelyThe solution is quite simple, It can be resolved using and it will work @oussamaelhajoui @jelkinsiv @guigons |
Great its working for me... thanks alot |
I thought this may help some who stumbled on this page. I am using angular2-materialize and my materialize select input sometimes closes immediately after opening. I solved this by adding a click listener on a |
thanks it works....
…On Thu, May 30, 2019 at 12:35 AM armando-navarro ***@***.***> wrote:
I thought this may help some who stumbled on this page. I am using
angular2-materialize and my materialize select input sometimes closes
immediately after opening.
I solved this by *adding a click listener* on a div *that wraps* the
select tag, with nothing by event.stopPropagation() in the listener. This
fixed the issue for me.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#444?email_source=notifications&email_token=AECTW6S3UAVREH2F3UUP4K3PX3F67A5CNFSM4HACITK2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWQJQEY#issuecomment-497063955>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AECTW6SU33QFTAWMGSKZ2UDPX3F67ANCNFSM4HACITKQ>
.
--
Regards,
Guddu kumar
|
When adding preventDefault on the parent of a select tag, it wont close anymore.. |
Guys i find it solution for this problem and works for chrome.
|
Try this. |
This solution works partially. I have two datepickers in my form, when I click the first it works as it used to, but then if I click the first one again, nothing happens. If I click the second, it shows, and then clicking the first it shows again, and so on so forth. |
Thanks, mate:) |
Thanks @daya-s this worked for me. I got this problem after I opened my project after 2 years today, but I didn't have this problem before. What do you think caused this? |
its too late... but the follow works fine to me in 2021: $(document).on("mouseup", ".datepicker", function (event) { event.stopPropagation(); }); |
I have form and when I click on the datepicker or select field, it opens and then immediately closes.
Any idea if this is a bug or am I missing something crucial here?
Datepicker
Select
The text was updated successfully, but these errors were encountered: