jQuery UI datepicker will not display - full code included

前端 未结 4 1208
我在风中等你
我在风中等你 2021-01-12 02:35

I am having trouble displaying the jQuery datepicker as shown here: http://jqueryui.com/demos/datepicker/

I believe I downloaded all of the proper files, but to be c

相关标签:
4条回答
  • 2021-01-12 03:17

    Remove class="hasDatepicker"

    0 讨论(0)
  • 2021-01-12 03:24

    Please remove the class hasDatepicker from input tag and it should work fine.

    class = 'hasDatepicker' //Need to remove
    
    0 讨论(0)
  • 2021-01-12 03:33

    I had the similar issue. My resolution was to add z-indexin .date-picker of datePicker.css

    .date-picker {
    position: absolute;
    z-index:1000;/*********** MY Change *************/
    font-size: 1em;
    color: #CCC;
    text-align: center;
    cursor: default;
    
    border: 1px solid #444;
    border-radius: 2px;
    margin: 6px 0;
    background: #222;
    box-shadow: 8px 8px 12px rgba(0, 0, 0, 0.2);} 
    

    That's it!!! And Lo the date picker started displaying. Hope this helps some one who'd come here for similar issues.

    0 讨论(0)
  • 2021-01-12 03:34

    If you look carefully at the source code of jQuery UI lib you can see that it uses hasDatepicker class inside for datepicker. So, use any other class (even hasdatepicker works) but not hasDatepicker:

    <input type="text" id="datepicker" class="anyOtherClassName"/>
    

    or:

    <input type="text" id="datepicker" class="hasdatepicker"/>
    
    0 讨论(0)
提交回复
热议问题