Skip to content
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

date picker and time picker not editable in chrome #233

Open
gallaszlo opened this issue Mar 28, 2019 · 13 comments
Open

date picker and time picker not editable in chrome #233

gallaszlo opened this issue Mar 28, 2019 · 13 comments

Comments

@gallaszlo
Copy link

In chrome if the input date contains any data and you click to edit, the date picker shown up but it closes automatically and you can't change the value, On your demo page you can test it: https://krescruz.github.io/angular-materialize/#input-date

@danswater
Copy link

same issue, since angular materialize is dependent of materialize lib
Dogfalo/materialize#6312

@anfho93
Copy link

anfho93 commented Mar 30, 2019

I have the same issue

@rupesh9
Copy link

rupesh9 commented Apr 2, 2019

+1

@akshayrao14
Copy link

akshayrao14 commented Apr 2, 2019

+1
The calendar stays until the mouse click is lifted. If I keep the mouse clicked, it stays, but that doesn't help much.

@ersonukr
Copy link

ersonukr commented Apr 2, 2019

+1

@webbiesdk
Copy link
Collaborator

It seems the bug is in the pickadate plugin included in Materialize and/or Chrome

It might fix the issue to simply include the latest version of pickadate on top of Materialize (https://amsul.ca/pickadate.js/), I have not tested this.

But I don't think we should do anything here before the Materialize issue has been closed.

There are some temp solutions in the issues linked above, you can use those for now.

If someone finds a way to fix the issue in this code-base, then pull-requests are welcome.

@webbiesdk
Copy link
Collaborator

Also: I can't seem to replicate the issue on my machine, so it would be hard for me to fix it.

@anfho93
Copy link

anfho93 commented Apr 2, 2019 via email

@preeti-sharmaAvanti
Copy link

preeti-sharmaAvanti commented Apr 3, 2019

I also have the same issue.

@amandadianni
Copy link

amandadianni commented Apr 18, 2019

I followed the suggestion on this stackoverflow's post and it worked for me:
https://stackoverflow.com/questions/55200244/materialize-date-picker-automatic

EDIT
Since the answer is not accepted in stackoverflow yet, I'm posting here:
$('.datepicker').on('mousedown', function(event) { event.preventDefault(); });

@akshayrao14
Copy link

@amandadianni thanks!

@rupesh9
Copy link

rupesh9 commented Apr 19, 2019

Thank You @amandadianni. The solution given on the link given by @amandadianni works for me after a small change. I changed the class "datepicker" to "picker__input".

$(document).on('mousedown', '.picker__input', function(event){
  event.preventDefault();
})

@gallaszlo
Copy link
Author

Thanks. If you use timepicker too, you have to use the following:
$(document).on('mousedown', '.timepicker', function(event){ event.preventDefault(); })

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants