I'm trying to use the jquery datepicker, but every time I create it it always pops up, as if it had statically there. Example of what is happening, and not appearing only when I click. link
I'm trying to use the jquery datepicker, but every time I create it it always pops up, as if it had statically there. Example of what is happening, and not appearing only when I click. link
Edited / corrected: I forgot to edit the fiddle link.
Maybe using an input instead of the span tag will work. example: link
html:
<input type="text" id="test" maxlenght="10">
js:
$("#test").datepicker();
As Diego Andrade punctuated me, if you use an input everything happens correctly. So I solved the situation as follows link
I have an input within the span, I will keep this input hidden
<span id="test">
<input id="datepicker" type="text">
bla
</span>
And I'll use the following localization in javascript
$("#datepicker").datepicker();
$("#datepicker").hide();
$("#test").click(function(){
$("#datepicker").show().focus().hide();
});
Every time the span is clicked, the datepicker will open