i am using ember-flatpickr version 2.12.0 and I am facing a formatting issue on mobile devices. I set the property dateFormat to "d.m.Y" which works fine on desktop browsers, but on mobiles formates to "mm/dd/yyyy". Can somebody help me with this? check out the screenshot
Here is repro link, just switch your browser to responsive mode or check it on mobile. Thank you for advices
const fp = flatpickr(".date", {
dateFormat: 'd.m.Y'
});
article {
padding: 16px;
width: 50%
}
<link href="https://npmcdn.com/[email protected]/dist/flatpickr.css" rel="stylesheet"/>
<script src="https://npmcdn.com/[email protected]/dist/flatpickr.js"></script>
<article>
<input type="text" placeholder="Select Date.." class=date>
</article>
For anyone who are facing the same problem, you can disable the mobile view option.
Add the following option in flatpickr:
{
disableMobile: "true"
}
For more information, Mobile Support - FlatPickr Documentation
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With