我正在添加jquery mobile date picker,但它默認顯示日期選擇器。相反,我希望它只顯示在焦點上,並在該領域失去焦點時被隱藏......任何想法如何?如何僅在場焦點上顯示日期選擇器?
頁標題我在補充人體
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css" />
<link rel="stylesheet" href="/css/jquery.ui.datepicker.mobile.css" />
<script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
<script>
//reset type=date inputs to text
$(document).bind("mobileinit", function(){
$.mobile.page.prototype.options.degradeInputs.date = true;
});
</script>
<script src="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.js"></script>
<script src="/js/jQuery.ui.datepicker.js"></script>
<script src="/js/jquery.ui.datepicker.mobile.js"></script>
和日期字段,使其工作:
<label for="date">Date Input:</label>
<input type="date" name="date" id="date" value="" />
向我們展示一些代碼 – jbabey