-
Notifications
You must be signed in to change notification settings - Fork 15
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
Error when mobile #9
Comments
@projct1 thanks for your issue report 👍 Which versions are you using for both, flatpickr and shortcut-buttons-flatpickr? Thanks |
@jcsmorais plugin is 0.3.0, flatpickr is 4.5.7 require('flatpickr').localize(require('flatpickr/dist/l10n/ru').default.ru);
flatpickr.setDefaults({
plugins: [
require('shortcut-buttons-flatpickr')({
button: [
{label: 'Сегодня'},
{label: 'Завтра'},
{label: 'Послезавтра'}
],
onClick(index, fp) {
let date = index ? new Date(Date.now() + 24 * index * 60 * 60 * 1000) : new Date;
fp.setDate(date, true);
fp.close();
}
})
]
});
$('[name=date]').flatpickr(); |
@projct1 based on your information I created this codepen where I was able to reproduce the issue. This is actually the first time I'm testing flatpickr on mobile, according to the documentation if a mobile devices is detected it falls back to native date/time/datetime picker. So a quick fix would be to just disable shortcut-buttons-flatpickr plugin once a mobile device is detected. A long term fix would be to make it work on mobile devices the same way it does for web apps. Let me know if you have any thoughts around that. |
@jcsmorais Thanks) |
@projct1 sorry for the late reply. |
Hio)
http://skrinshoter.ru/s/080619/aQdkvR03
Flatpickr using native mobile picker. I guess problem is with this.
The text was updated successfully, but these errors were encountered: