You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First off, thanks for a great plugin. However, we're having an issue that might have quite large implications for mobile users.
When pressing "Next month" icon on my Samsung Note 2 (Android 4.4.2 native browser), it jumps two months, thus making it impossible to select a date that is in the month between.
Could the issue be that it's triggering both for "touchdown" and "touchup" (not sure what the events are actually called in the mobile world)?
It seems to be working fine when you hold down for a second or more. But if you just tap, it will jump 2 months.
I tried adding a debounce method, like this, but unfortunately it didn't resolve the issue:
picker = new Pikaday({
field: document.getElementById(scope.id),
defaultDate: new Date(scope.model),
setDefaultDate: true,
minDate: new Date(scope.minDate),
maxDate: new Date(scope.maxDate),
firstDay: 1,
format: 'YYYY-MM-DD',
i18n: getLocalizedNames(),
numberOfMonths: getMonthsToShow(), // 1 month for mobile, 2 for other devices
position: datepickerPosition,
reposition: false
});
picker._onMouseDown = debounce(picker._onMouseDown, 300);
It's working fine in Chrome for the same device. Only the native browser is having issues.
Any thoughts on potential solutions?
The text was updated successfully, but these errors were encountered:
First off, thanks for a great plugin. However, we're having an issue that might have quite large implications for mobile users.
When pressing "Next month" icon on my Samsung Note 2 (Android 4.4.2 native browser), it jumps two months, thus making it impossible to select a date that is in the month between.
Could the issue be that it's triggering both for "touchdown" and "touchup" (not sure what the events are actually called in the mobile world)?
It seems to be working fine when you hold down for a second or more. But if you just tap, it will jump 2 months.
I tried adding a debounce method, like this, but unfortunately it didn't resolve the issue:
It's working fine in Chrome for the same device. Only the native browser is having issues.
Any thoughts on potential solutions?
The text was updated successfully, but these errors were encountered: