How to run date picker onclick event?

Posted by Nitz on Stack Overflow See other posts from Stack Overflow or by Nitz
Published on 2010-05-18T17:12:16Z Indexed on 2010/05/18 17:20 UTC
Read the original article Hit count: 633

Filed under:
|
|

Hey Guys
I am using this date picker from jqueryui.
If see on that page, then u will find that they have just written in one function...means this...

    $(function() {
        $("#datepicker").datepicker();
    });
    </script>

But i want to open my date picker on one text box click event.
so i have written this

$("#datepicker").datepicker();

in one function which i am calling on textbox onclick event.
but in this there is one problem coming..

i am only get date picker on second time click on text box.
if i click first time after page load then date picker will not come but as soon as i click second time then date picker is coming?

WHY? AND CAN I DO IT ON FIRST CLICK?

yes i know this already happening perfect if i put first code but i want it on my function.

© Stack Overflow or respective owner

Related posts about jquery-ui

Related posts about jQuery