[英]Jquery Ui Date Picker Not Working?
我的表單代碼在這里。
<div class="threeleft second" id='displayallformshow' style="float: none;width: 80%;padding:10px;">
<form action="investor_submit.php">
<div class='formdiv'>
<div style='width:35%;margin-top:12px;'>Published :</div>
<div style='width:41%;text-align:justify'>
<div style="float: left;">
<input type="radio" name="published" id="" value='publishedyes'>
</div>
<div style="float: left;width: 237px;">Yes, allow users who follow links to my venture URL the ability to see my venture page.</div>
<br>
<br>
<div style="float: left;">
<input type="radio" name="published" id="" value='publishedno'>
</div>
<div style='float: left;width: 237px;'>No, display an error message to anybody who tries to follow links to my venture except for me.</div>
</div>
</div>
<br>
<br>
<div class='formdiv'>
<div style='width:35%;margin-top:12px;'>Listed and Discoverable :</div>
<div style='width:41%;text-align:justify'>
<div style='float: left;'>
<input type="radio" name="listedanddiscoverable" id="" value='listedanddiscoverableyes'>
</div>
<div style='float: left;width: 237px;'>Yes, I want my ventureto be listed in the browser section making it discoverable to RockThePost Visitors. (Required Paid Subscription)</div>
<br>
<br>
<div style='float: left;'>
<input type="radio" name="listedanddiscoverable" id="" value='listedanddiscoverableno'>
</div>
<div style='float: left;width: 237px;'>No, do not list my venture anywhere automatically. I willmanually invite people to my venture with my venture URL.</div>
</div>
</div>
<div class='formdiv'>
<div style='width:35%;margin-top:12px;'>Describe Start Date :</div>
<div style='width:55%;'>
<input class='madetextboxlong' placeholder="Enter Describe Start Date" type="text" name="describestartdate" id="describestartdate">
</div>
</div>
<div class='formdiv'>
<div style='width:35%;margin-top:12px;'>Describe end Date :</div>
<div style='width:55%;'>
<input class='madetextboxlong' placeholder="Enter Describe end Date" type="text" name="describeenddate" id="describeenddate">
</div>
</div>
<br>
<br>
<br>
<div style="margin-left: 288px;margin-top: 423px;width: 100%;" class="formdiv">
<input type="submit" id='publishform' class="madebtnsave" name="save" value="Save" />
</div>
</form>
</div>
該表格我點擊事件加載。 用戶在加載時單擊投資者選項卡。
該表格正常工作,但問題不是加載jQuery ui datepicker
這是我的日期選擇器代碼。
$( "#describestartdate" ).datepicker();
$( "#describeenddate" ).datepicker();
請幫助我解決該問題,如何使用jquery datepicker。
當我加載沒有點擊事件的表單時,日期選擇器顯示成功。
但我加載窗體單擊事件,日期選擇器未顯示。
親愛的朋友試試看。
$("event tab ID").click(function(){
$( "#displayallformshow #describestartdate" ).datepicker();
$( "#displayallformshow #describeenddate" ).datepicker();
});
我希望這對您有用。
如果您在click事件上加載表單,則必須注冊datepicker
處理程序
$( "#describestartdate" ).datepicker();
$( "#describeenddate" ).datepicker();
加載后。 將這些行放在表單加載回調(on-click事件)的末尾。 否則,將在目標項目可用之前執行這些行,即$("#describestartdate")
將返回一個空列表,並且什么都不會發生。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.