Open GoogleCodeExporter opened 8 years ago
For some reason when tinymce is used, only the first argument passed to jquery's
append method will actually be appended. If you change the commas on lines
829, 839,
848, 858, and 867 to ').append(' in jquery.datepicker.js, the datepicker field
works
correctly.
Passing multiple arguments to jQuery.append isn't directly specified in docs
(http://api.jquery.com/append/), but there are some user comments that indicate
that
is it a feature.
Original comment by mackeyn@gmail.com
on 15 Apr 2010 at 7:22
Yeah - I have run into this before (mine is one of the comments on the bottom
of the
docs page). It is certainly weird that TinyMCE changes the behaviour of the
jQuery
core - I tend to think of this as a TinyMCE bug...
I could obviously change the plugin code to call append multiple times but I
think
the current code is more elegant (and works fine when TinyMCE hasn't got
involved). I
wrote that comment on the docs to try and get "official" feedback on whether
append
_should_ accept multiple items but there doesn't appear to be anything
official...
Original comment by kelvin.l...@gmail.com
on 15 Apr 2010 at 9:48
I'm glad this discussion has got underway, as I think Kelvin's datepicker is
the best
one out there. Unfortunately, I too am running with TinyMCE and therefore the
picker
doesnt show up.
However, I am unable to get the same results as Mack (comment 1) when
downloading the
datepicker.js from the main page and even the google repository because the line
numbers he has provided dont match up to anything.
Kelvin, is it possible to either release a proper patch file or another js file
if
you have tinymce on the same page please?
Thanks
Original comment by paulmos...@gmail.com
on 18 Apr 2010 at 11:22
My line numbers must have referred to an older version. I've attached a patch
generated with the [$Id: jquery.datePicker.js 94 2010-01-25 02:25:27Z
kelvin.luck $]
version.
My preference is for the datepicker to work properly no matter what else it's
used
with. This does look like a tinymce issue, but the use of append with multiple
arguments is undocumented. I dug into the jQuery source and it appears that
multiple
arguments should work. Unfortunately, I don't have the time to spare at the
moment
to dig deeper.
I also strive to write clean, concise code, but in this situation, it may be
best to
apply the 5 line patch to safeguard against this issue.
Original comment by mackeyn@gmail.com
on 21 Apr 2010 at 1:22
Attachments:
Original issue reported on code.google.com by
newelli...@gmail.com
on 8 Mar 2010 at 5:09