Pages

Sunday, March 13, 2016

JQuery datepicker not appears on first click.

I implement a jquery date picker on a text box on a click event. But it is not appear on first click. I always have to click on the text box and then out of the text box and then again on the text box then the calender has appear.

To open the calender in first click i have found this solution over the web. I have changed the "click" event to live "event"


$('.week_selector').click(function(){
$(this).datepicker();
});

Changed the above code to the following

$('.week_selector').live('focus',function(){
$(this).datepicker();
});


posted by honeyonsys

No comments:

About Me

Hi,My name is Harish Kumar.I am a web developer by profession.I am working in the same field since 2008. About my skills i am proficient in HTML,CSS,JAVASCRIPT/JQUERY/ ANGULAR,PHP,MYSQL,APACHE,LINUXAJAX, REST,etc...