No problem - thanks for the informative answers. Click input is a special case which relates to an input field. When a date
is selected the .text property of the input field is updated. So it wouldn't work too well on any other type of element.
I guess this semantically makes sense: being user input it should go into an input box! I think I will probably use your suggestion of a hidden input box and a read-only <span> for displaying the date. Granted there still needs to be server-side format validation, but I think it makes sense to only have the one input method client-side. Yes. dpDisplay returns a jQuery object so that it is chainable. You
shouldn't be calling it from the href of a link anyway - it is mixing behavior with content. If you really want to call it from a href you could wrap it in a void(). But don't forget to also return false. Alternatively, you could put it directly on the onclick handler in the link. However, by far the preferred method is to dynamically bind it onReady like is done in my example linked above. This seperates behaviour and content cleanly.
Of course, sorry it was the Friday-brain effect ;-) again I have to agree with you. It's a documentation error. I'll update the documentation to explain that it
expects a Date object (the change you made might have other unforseen consequences).
Ok I'll revert my change and pass in a date instead. I thought that was the other possible alternative! Cheers, --rob On 6/1/07, Kelvin Luck <[EMAIL PROTECTED]> wrote:
Hello again! Rob Desbois wrote: > Also, dpSetPosition() has the wrong first sentence too. Thanks - I'll fix that too. > > There's a bug or documentation error with dpSetSelected() [revision > #1993] : it's documented as taking a string, but the code for it > requires a Date (due to using .getMonth(), .getFullYear() and .getTime()). > > To fix this problem I added the line d = new Date(d); to the start of > dpSetSelected(). It's a documentation error. I'll update the documentation to explain that it expects a Date object (the change you made might have other unforseen consequences). Thanks for tracking down those problems, Cheers, Kelvin :)
-- Rob Desbois Eml: [EMAIL PROTECTED] Tel: 01452 760631 Mob: 07946 705987 "There's a whale there's a whale there's a whale fish" he cried, and the whale was in full view. ...Then ooh welcome. Ahhh. Ooh mug welcome.