engineer9090909090909090 / jquery-datepicker

Automatically exported from code.google.com/p/jquery-datepicker
0 stars 0 forks source link

date picker not working with jquery 1.6.1 #285

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
New version of jquery is not compatible with this v2 plugin.

Original issue reported on code.google.com by rik...@gmail.com on 24 May 2011 at 1:00

GoogleCodeExporter commented 8 years ago
Can you tell us if you plan to update this anytime soon? This is a huge problem 
for us. We need to upgrade jQuery and everything works except the date picker. 
I need to know whether I have to go find a new one or if you're working on 
fixing this please. Thanks.

Original comment by rareview...@gmail.com on 31 May 2011 at 6:55

GoogleCodeExporter commented 8 years ago
I'm currently don't have time to work on a fix for it. The fix is probably 
quite simple and I'm happy to accept a patch if someone wants to investigate 
and find out what the actual problem is. According to the release notes of 
jQuery 1.6 [ http://blog.jquery.com/2011/05/12/jquery-1-6-1-released/ ] I'd 
expect the problem to maybe be related to the .attr code...

Original comment by kelvin.l...@gmail.com on 1 Jun 2011 at 9:21

GoogleCodeExporter commented 8 years ago
We had this problem as well. We delved into the datepicker code and made a 
logic adjustment which fixed the datepicker our purposes. You're more than 
welcome to try it for your implementation. 

The change was made in line 1725 of the uncompressed datepicker javascript code 
by changing the first part of the ternary operator from instActive.inline to 
(typeof(instActive) == 'undefined' || instActive.inline).

Original comment by rvdivinc...@ethixsystems.com on 1 Jun 2011 at 6:16

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks for the answer but unfortunately it looks like that is for the jQuery UI 
date picker...

http://code.google.com/p/jquery-datepicker/wiki/NotTheUIDatePicker

Original comment by kelvin.l...@gmail.com on 1 Jun 2011 at 6:19

GoogleCodeExporter commented 8 years ago
Hi Kelvin, I added some lines in the "_closeCalendar" function and it works 
fine for me. I tested it using JQuery v1.6.1, v1.5.2 & v1.3.2 on Firefox 
v3.6.17 and IE 7. I just include them to make it work and if there are better 
solutions, please share. :)

Please refer to attached file.

Original comment by ahmat.ha...@gmail.com on 17 Jun 2011 at 12:25

Attachments:

GoogleCodeExporter commented 8 years ago
Hi,

Thanks you very much! So what was the change in jQuery 1.6 which was causing 
problems?

Cheers,

Kelvin :)

Original comment by kelvin.l...@gmail.com on 17 Jun 2011 at 1:49

GoogleCodeExporter commented 8 years ago
erm... actually, i didn't go through jQuery's file but just work within date.js 
and datePicker.js. :)

Original comment by ahmat.ha...@gmail.com on 18 Jun 2011 at 11:43

GoogleCodeExporter commented 8 years ago
I meant what was the particular change that you made which fixed it so that it 
worked with jQuery 1.6... All of the stuff you are doing formatting the date 
shouldn't have any effect at all with different versions of jQuery (and should 
really be contained in the date parsing in date.js - what did you need here 
that isn't covered in date.js?)

So I guess that the bug which appears in jQuery 1.6 is something to do with the 
line:

$(this.ele).trigger('dpClosed', [this.getSelected()]);

In the original date picker code?

Original comment by kelvin.l...@gmail.com on 19 Jun 2011 at 10:24

GoogleCodeExporter commented 8 years ago
yes that line doesn't work.

I thought "_closeCalendar" is the last function before my selected date will be 
shown on the input form as when i wrote this line:

 " $(this.ele).val(this.getSelected()); "

it does appear and my Firefox doesn't prompts out script error anymore.

However, "this.getSelected()" gives out an output as configured in the 
"Date.fromString". I wanted the output to be in the form of "Date.format" that 
i selected but i couldn't figure out where to edit or add in the date.js. 
That's why it ended up in the "_closeCalendar" function.

Original comment by ahmat.ha...@gmail.com on 21 Jun 2011 at 8:21

GoogleCodeExporter commented 8 years ago
Fix is very simple : change in datepicker.js all "className" width "class" 

Ex. : .attr('className', 'dp-calendar') to .attr('class', 'dp-calendar')

Original comment by macr...@gmail.com on 8 Jul 2011 at 2:28

GoogleCodeExporter commented 8 years ago
But there aren't any instances of className in 
http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/scripts/jquery.datePi
cker.js !

Original comment by kelvin.l...@gmail.com on 8 Jul 2011 at 5:59

GoogleCodeExporter commented 8 years ago
Sorry i'm using old version.

Original comment by macr...@gmail.com on 11 Jul 2011 at 7:16

Attachments:

GoogleCodeExporter commented 8 years ago
So there is no problem with the latest version of the date picker and jQuery 
1.6.1?

Original comment by kelvin.l...@gmail.com on 11 Jul 2011 at 8:17

GoogleCodeExporter commented 8 years ago
I use jquery 1.6 and don't have a problems

Original comment by macr...@gmail.com on 11 Jul 2011 at 12:44

GoogleCodeExporter commented 8 years ago
Thanks. It appears that this ticket was invalid then - the latest version of 
the date picker code works with jQuery 1.6.x

Original comment by kelvin.l...@gmail.com on 11 Jul 2011 at 12:52