chrisdavies / tiny-date-picker

A small, modern, dependency-free date picker
https://chrisdavies.github.io/tiny-date-picker/
415 stars 87 forks source link

Double Tap Required on Date Range Picker #69

Closed chrispond closed 6 years ago

chrispond commented 6 years ago

Hello Chris,

I ran into an issue on iphone 6s where I need to double tap a date in order for the event 'statechange' to fire. I thought maybe it was just my project, but when I tested your demo the behavior was the same. Any chance you might have an idea what the cause of this is?

Cheers

chrisdavies commented 6 years ago

Hm. This is the second iOS related issue. I'll have to take a look. Unfortunately, I won't have access to an iOS device for another week, as mine is back home (across the country). Meanwhile, let me know if you find any more details.

What browser are you using (I'm assuming Safari).

chrispond commented 6 years ago

Yes I'm on Safari. I'll be doing more testing on other mobile devices and browsers so if I find anything else I'll let you know.

chrispond commented 6 years ago

I tested on ios (iphone & ipad) and android (galaxy, s7, s8, nexus) devices and it seems to just be just an ios issue.

chrisdavies commented 6 years ago

Bah. That's bad news for me, as I have easier access to Android. Oh, well. Thanks for testing so thoroughly! I'll try to get on this next week.

On Wed, Mar 14, 2018 at 7:52 AM, chrispond notifications@github.com wrote:

I tested on ios (iphone & ipad) and android (galaxy, s7, s8, nexus) devices and it seems to just be just an ios issue.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/chrisdavies/tiny-date-picker/issues/69#issuecomment-373049399, or mute the thread https://github.com/notifications/unsubscribe-auth/AAy3YS4_Ktc5BeTRpZP10G0yDykeK8rOks5teS6vgaJpZM4Sn1Co .

chrispond commented 6 years ago

Any progress on this issue?

chrisdavies commented 6 years ago

Er... not yet. I was traveling all weekend, and have guests in town until tomorrow. I should be able to take a look this week, though, after my guests head out. Sorry for the delay!

chrispond commented 6 years ago

Sounds good thanks :)

chrisdavies commented 6 years ago

I wasn't able to reproduce this, but I'm running an older version of iOS, unfortunately (my device is too old to upgrade, these days!). I fixed a few other issues that I found, though, and suspect those would have fixed your issues, too. Give 3.2.1 and let me know if it is still not working.

chrispond commented 6 years ago

Tested this morning and I'm still required to double tap. I tested my local project with version 3.2.1 and also tested your demo page and got the same results. When I tap a date for the first time, the date highlights as it would on mouse hover a non-touch device. My guess is that there is a mouseenter, mouseover, focus event that is preventing the click from being fired. I tried to remove all hover styles from the css to see if any of the :hover:before were causing the issue but they weren't.

chrisdavies commented 6 years ago

Ah. I think I misread this issue initially. Does the calendar actually select dates, etc with one click? Is it just the statechange event that isn't working as expected? What version of iOS are you running?

chrispond commented 6 years ago

Yah it's the statechange that isn't working. I'm currently running ios 11.2.5 on my iphone.

State Change doesn't work when:

  1. Touch any date, and it highlights a hover effect and doesn't update the state.start
  2. Touch a second date and it highlights a hover effect and doesn't update the state.start or state.end

State Change works when:

  1. Double tap a date and that triggers statechange and updates state.start
  2. Double tap a date and that triggers statechange and update state.end
chrispond commented 6 years ago

Any progress on this issue?

chrisdavies commented 6 years ago

Er. No. I still can't get it to reproduce on my iOS devices. I'm going to try to get it to reproduce in the the iOS emulator this week, though. If I can't, would you be willing to hop on Skype (or something) next week, and see if we can work out what's going on?

chrispond commented 6 years ago

I would totally be willing to Skype if you have the time. Keep me posted. Thanks for sticking with me on the this, it's appreciated.

filipaorocha commented 6 years ago

Same error noticed on Iphone 5c with IOS 10.3.3. Tried on Safari and Chrome.

Any touch inside some date range picker component(inside ''ex-inputs-picker'' div on demo page), makes datepicker close, except on dates.

e.g. If i touch ''next month'', ''year'' or ''month'' selector, datepicker dispatch the respective method but it closes as well. If I touch in any day, "hover" method is called instead of the ''click''. If i touch the same day again, the ''click'' method is called correctly.

I hope this helps to solve this issue.

Thanks for the amazing work.

chrisdavies commented 6 years ago

@hellmaru have you tried going here (and refreshing): https://chrisdavies.github.io/tiny-date-picker/

It does not behave that way for me on my old iPad mini nor on the latest iOS simulator.

@chrispond I'd be happy to hop on Skype. Wasn't able to reproduce on my iPad or via the simulator. I'll shoot you a private email, and we can make arrangements.

chrisdavies commented 6 years ago

Hm. @chrispond, it doesn't look like you have your email configured in GitHub. Mine is in my profile. Shoot me an email, and we'll coordinate a Skype session (or similar).

filipaorocha commented 6 years ago

@hellmaru have you tried going here (and refreshing): https://chrisdavies.github.io/tiny-date-picker/

Yes. The tests i've been done on the demo page itself. I can provide a video or something like that if it helps.

Just to make things clear, this issue only happen in DateRangePicker. TinyDatePicker works perfectly on IOS.

chrisdavies commented 6 years ago

Aaah. DateRangePicker. I misread this entire issue until just now. I've been looking at the date picker itself. sigh My fault. OK. DateRangePicker is really a good bit newer, so not surprised to hear of issues.

I'll look into reproducing / fixing it later this week. (Currently pretty slammed.)

chrisdavies commented 6 years ago

Should be fixed in the latest release (3.2.5). Sorry for the delay!

chrispond commented 6 years ago

Awesome thanks just tested and this looks great! Cheers.

afzaalb commented 6 years ago

At first i tried this date-range-picker.min.js , but the issue was still reproducible, so i switched to un-minified version and it works. Perhaps you need to update the min file also. @chrisdavies