问题
I am implementing the a pop up screen .On pop up screen I have one text field and date box .actually on clicking the date box and setting the date the focus goes to upper text field actually i try on fiddle .The issue is created (i don't know why). First go to intex.html click header button(+).This pop up screen open fill text data on that open date box add date it goes to above field..:(same code i write on fiddle but it is not reproduce this.
Here is that code https://www.dropbox.com/s/l2dtrxmnsurccxt/www.zip
I also try like that but no effect..:( focus is goes to above field.:I need please look again this question
<div data-role="content">
<div><img src="img/Documents.png"/></div>
<div data-role="fieldcontain">
<label for="text-12" style="text-align:top;margin-left: 0px;">Case Name:</label>
<input name="text-12" id="text-12" value="" type="text" class="caseName_h" >
</div>
<div data-role="fieldcontain">
<label for="mydate" style="text-align:left;margin-left: 0px;" >Case Date:</label>
<!--input name="text-12" id="text-12" value="" type="date" class="caseDate_h" -->
<input name="mydate" id="mydate" type="date" data-role="datebox" class="caseDate_h" data-options='{"mode": "datebox", "useNewStyle":true,"zindex":1200}'/>
</div>
<div data-role="fieldcontain">
<label for="textarea-12">Textarea:</label>
<textarea cols="40" rows="8" name="textarea-12" id="textarea-12" class="caseTextArea_h"></textarea>
</div>
</div>
回答1:
Case Name:
<div data-role="fieldcontain">
<label for="mydate" style="text-align:left;margin-left: 0px;" >Case Date:</label>
<input name="mydate" id="mydate" type="date" data-role="datebox" data-options='{"mode": "datebox", "useNewStyle":true}'/>
</div>
<div data-role="fieldcontain">
<label for="textarea-12">Textarea:</label>
<textarea cols="40" rows="8" name="textarea-12" id="textarea-12" class="caseTextArea_h"></textarea>
</div>
回答2:
Cannot access drop box, and the code is huge, but what i think might be a silly thing that the for="text-12" is being repeated, please attach the corresponding id with which the label is being associated for the date part.
来源:https://stackoverflow.com/questions/17665510/focus-goes-to-upper-fieldtext-field-after-setting-the-date-box-in-jquery-mobil