jquery mobile datebox custom alignment

后端 未结 1 1737
慢半拍i
慢半拍i 2021-01-28 21:24

I am currently using jquery mobile datebox (http://dev.jtsage.com/jQM-DateBox/) to display a calendar. I stuck the input in a div with display: none, and then I manually activat

相关标签:
1条回答
  • 2021-01-28 22:05

    Please try

        <div style="visibility:hidden; height: 0px;">
        <label for="mydate">Some Date</label>
    
        <input name="mydate" id="mydate" type="date" data-role="datebox"
           data-options='{"mode": "calbox"}'>
        </div>
    

    jQM-DateBox calculates its position probably from it's parent and because it isn't rendered (because of the display:none) this will be 0,0, setting visibility will fix this

    0 讨论(0)
提交回复
热议问题