0
I set up the pickadate
of Materialize
on an only page that it is getting in English and when I leave and go back to the tab that has the pickadate
it opens without me clicking on the field.
I inserted the materialize.min.css
in the header and the jquery-2.1.1.min.js
and materialize.min.js
at the bottom of the page.
Còdigo HTML:
<div class="input-field col s6">
<input name="dataIni" type="text" class="dataIniFim">
<label for="dataIni">Data Inicial</label>
</div>
<div class="input-field col s6">
<input name="dataFim" type="text" class="dataIniFim">
<label for="dataFim">Data Final</label>
</div>
After importing the javascript files at the bottom of the page insert this code:
$('.dataIniFim').pickadate({
selectMonths: true, // Creates a dropdown to control month
selectYears: 15, // Creates a dropdown of 15 years to control year
dateFormat: 'dd/MM/yy',
});
Code for testing: https://jsfiddle.net/Ly52g027/
Can you create a jsFiddle or mount the code to the question that plays the problem? Are you using a router?
– Sergio
I created the Fiddle. When the focus is on the field and I leave and come back he opens the
pickdate
automatically. It is in English and ignoring the format pattern I reported.– Wendel Rodrigues
I realized that this behavior of opening datepicker automatically when leaving and back in the tab happens even in the site of materializecss
– Marco