Datepicker problem when trying to make a second click in Jquery
I am using datepicker plugin on Jquery. Everything works fine at first glance. When I click the input fi开发者_开发百科eld, it shows the calendar. Then I click on the input field again, it doesnt show up the calendar.
If I click outside of the input field that is related to datepicker and then try to click it again. This time calendar is shown. This is something related on focus but I couldnt solve it. How can I solve this issue ?
Thanks in advance,
$(selector + '.datepickerFlexible').datepicker({
defaultDate: '0',
minDate: new Date(),
maxDate: new Date(new Date().getTime() + (30 * 24 * 60 * 60 * 1000)),
changeYear: true,
selectDefaultDate: true,
yearRange: '-0:+0',
dateFormat: 'dd/mm/yy'
});
HTML
<div class="GeneralTextBox left lpush">
<input name="TargetDate" type="text" class="Input datepickerFlexible" value="" />
</div>
I have tasted your code ..its works perfectly for me. I think when you clicking second time there should be problem here $(selector + '.datepickerFlexible')
I think it will work if you remove the word 'selector' from the first line.
精彩评论