Flatpickr mobile format

col*_*ion 1 javascript datepicker flatpickr

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

  • flatpickr version used: 4.5.4

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'
});
Run Code Online (Sandbox Code Playgroud)
article {
  padding: 16px;
  width: 50%
}
Run Code Online (Sandbox Code Playgroud)
<link href="https://npmcdn.com/flatpickr@4.5.5/dist/flatpickr.css" rel="stylesheet"/>
<script src="https://npmcdn.com/flatpickr@4.5.5/dist/flatpickr.js"></script>
<article>
  <input type="text" placeholder="Select Date.." class=date>
</article>
Run Code Online (Sandbox Code Playgroud)

liz*_*kya 5

对于面临相同问题的任何人,您可以禁用移动视图选项。

在 flatpickr 中添加以下选项:

{
    disableMobile: "true"
}
Run Code Online (Sandbox Code Playgroud)

有关更多信息,移动支持 - FlatPickr 文档