datepicker shows calendar before date field has focus

datepicker shows calendar before date field has focus

Using these versions:

//code.jquery.com/jquery-1.10.2.min.js
jquery-ui-1.11.2.custom/jquery-ui.min.js

When my form loads, I get a static calendar (clicking has no effect), and when I click in the date field, I get a usable calendar.



after getting focus:




My code is

  1. <input type =" text " name =" dateObs " id =" dateObs " class =" date-pick " value =" " />

  1. $(document).ready(function()
    {
    $.datepicker.setDefaults(
    {
    showOn: "focus",
    dateFormat: "yy-mm-dd"
    });

    $(".date-pick").datepicker();
    });

Any idea what I am doing wrong?