1
我有兩個Timepickers
。問題是雖然兩個時間選擇器屬於一個文本輸入(開始時間輸入),當他們應該屬於2個不同的。無法在2個不同文本輸入中分配jQuery時間選擇器。
durationpicker是用於持續時間輸入和timepicker是用於開始時間之一。
我該如何分開時間選擇器,使它們屬於正確的輸入?
下面是jQuery代碼:
$('#durationpicker').timepicker({});
$(function() {
$('#timepicker').timepicker({
showOn: 'button',
button: '.timepicker_button_trigger'
});
});
和HTML:
<form action="QandATable.php" method="post" id="sessionForm">
<p>
<strong>3: Duration:</strong>
<input type="text" id="durationpicker" name="durationChosen" readonly="readonly"/>
<p>
<strong>5: Start Time:</strong>
<input type="text" id="timepicker" name="timeChosen" readonly="readonly" />
<span class="timepicker_button_trigger">
<img src="Images/clock.gif" alt="Decrease" />
</span> <br/>
<span id="dateTimeAlert"></span>
</p>
</form>
注:我使用Trentrichardson's Timepicker的時間輸入和François Gélinas的開始時間輸入。