I have implemented jquery datepicker for the first time in my project and i have two input fields which will take date as input and i have used class selector to in jquery. My jquery version is jquery-1.11.0.js and UI is jquery-ui-1.10.4.custom.js. But for only one field date picker is opening and that ti it is taking long time to open.
My HTML code is
<div>
<label for="dateFrom" class="desc">
<fmt:message key="date.from"/>
</label>
<input type="text" name="dateFrom" id="dateFrom" class="datepicker" value="" readonly="readonly" />
</div>
<div>
<label for="dateTo" class="desc">
<fmt:message key="date.to"/>
</label>
<input type="text" name="dateTo" class="datepicker" id="dateTo" readonly="readonly" value=""/>
</div>
My Jquery Code is
$(function() {
$('#dateFrom').click(function() {
$('#dateFrom').datepicker();
});
$('#dateTo').click(function() {
$('#dateFrom').datepicker();
});
});