Dogfalo / materialize

Materialize, a CSS Framework based on Material Design
https://materializecss.com
MIT License
38.86k stars 4.74k forks source link

Datepicker doesn't work in iPhone #6476

Open blasco opened 4 years ago

blasco commented 4 years ago

The datepicker works perfectly fin in android devices, chrome, safari and even the iphone X simulator... Nevertheless, when I try on a real iPhone device this i what happens:

ezgif-4-b8a5e38b5011 (1)

The dropdown menu lets you select the year, but when you click on a yaer, a nearby year is selected instead of the clicked year.

Your Environment

aksm commented 4 years ago

Experiencing the same issue. Seems to be specific to IOS 13+ as it wasn't occurring on a device with 12. Unlike @blasco it's happening on the simulator too for me. Only happens when selecting a year going down, e.g. 2020 to 2019 skips to 2018. Doesn't happen the other way.

blasco commented 4 years ago

I think you are right, it was happening in the simulator too. Last time I tried I didn't scroll to the bottom so thought it was working.

4lenz1 commented 4 years ago

I add browser-default class in datepicker to avoid this problem for now.

onDraw(){
$('.datepicker-select').addClass('browser-default');
}

and detect which platform are using if you running you app under multi devices

hoping it helps you :D