你好我有一些代码如下
<script>
jQuery(document).ready(function($) {
jQuery("#check_in").datepicker({
dateFormat: "yy-m-dd",
minDate: 0,
showOtherMonths: true,
firstDay: 1,
onSelect: function( selectedDate ) {
jQuery( "#check_out" ).datepicker( "option", "minDate", selectedDate );
},
});
jQuery("#check_out").datepicker({
dateFormat: "yy-m-dd",
minDate: 0,
showOtherMonths: true,
firstDay: 1,
onSelect: function( selectedDate ) {
jQuery( "#check_in" ).datepicker( "option", "maxDate", selectedDate );
},
});
});
</script>';
&#13;
<div class="row_field field_text">
<label class="label_title">'.__('Check Out','tfuse').'</label>
<input type="text" name="check_out" value="" id="check_out">
<span class="icon icon-calendar"></span>
</div>
&#13;
问题是我想要的,当我点击跨度图标来调用函数时,就像输入字段中的剂量一样。如果有人有任何解决方案,请帮助
答案 0 :(得分:0)
您可以通过单击图标将焦点设置为输入。像这样:
$('.icon-calendar').click(function() { $(this).prev().focus(); });