1
Using jQueryUI datepicker by default the date click event and the datepicker close works.
How can I do it on bootstrap datepicker ?
JS:
$('#data').datepicker({
format: 'dd/mm/yyyy',
language: 'pt-BR',
});
HTML:
<input id="data" class="form-control text-center" type="text">
does not work this option, I googled and found in stackoverflow USA an answer equal to this. and also the https://bootstrap-datepicker.readthedocs.org/en/releaseplugin documentation/
– Gabriel Rodrigues
This option is available as of version 1.3.1 that can be downloaded from official repository. In this demo you can see this option working.
– André Ribeiro
http://jsfiddle.net/filadown/wa5kp0pw/ how strange, I did a test on jsfiddle and it is running, now on my system it is not, and I confirmed several times the order of the files, 1 jquery,2 bootstrap, 3 datepicker,4 functions,js calling datepicker
– Gabriel Rodrigues
I don’t know if you’ve tried or if this is the problem, but clearing the browser cache might help. Maybe you’re still loading the old version.
– André Ribeiro
I tried to clear the cache before too, but it didn’t work.
– Gabriel Rodrigues
Something on the console?
– André Ribeiro
no message on the console... https://drive.google.com/file/d/0ByiDi-nlXfgVNXFUmZGeTZjQlE/view?usp=sharing
– Gabriel Rodrigues
@Gabrielrodrigues You have not updated the js of datepicker. What is in your project is a 2012 version (js/plugins/datepicker.js).
– André Ribeiro
That’s right, I always rename the file name to be simpler and semantic and at the time of replacing ended up not doing it
– Gabriel Rodrigues