views:

27

answers:

1

I'm using Tablegear and jQuery UI's date picker in my site and somehow only the one I declare first is working. I'm not sure but it can be a conflict issue, can't be?

Here's the code: http://jsfiddle.net/nc3Rs/

Notice that I added the TableGears1.6-jQuery.js as a resource. As soon as I remove this resource the date picker begins to work.

How can I solve this conflict?

+1  A: 

Hi,

I looked at this and found that if you remove the bit of script shown below from the end of the TableGears1.6-jQuery.js file, the datepicker script will start working again:

// Fix for jQuery 1.4.2 strangely not firing browser native focus event.
jQuery.fn.focus = function(){
  this.each(function(){
    if(this.focus) this.focus();
  });
};
fudgey
Wow! How did you find out? Do you have an idea about why they wrote this bit of script?
Rodrigo Alves
BTW it worked perfectly
Rodrigo Alves
It was the only thing in the source that looked like it might cause trouble. And I have no idea why it was added, but I am glad it solved your problem :) Also, I added this problem to the TableGears github issue list: http://github.com/andrewplummer/TableGear/issues/#issue/1
fudgey