I think I fixed it! (With your help of course ...)

This is the way I had it previously:

jQuery.noConflict();
$(function()
  {
    jQuery('.date-pick').datePicker({clickInput:true});
  });

And this is how it should be:

jQuery.noConflict();
jQuery(function()
  {
    jQuery('.date-pick').datePicker({clickInput:true});
  });

In other words, I replaced the '$' before ('.date-pick') with
'jQuery', but not the '$' before 'function()'. Dumb.

Now I just have to get css to work! The calendar appears with *some*
styles it seems, but at the bottom-left-hand corner of the screen! But
I think this is because Appfuse uses SiteMesh to decorate jsps, and if
you want to use custom css you have to mess with it ...

Many thanks!
Bob
On Aug 8, 4:09 pm, Kelvin Luck <[EMAIL PROTECTED]> wrote:
> Because you are using jQuery in noConflict mode you can no longer use $
> to create jquery objects. So you need to replace:
>
> $('.date-pick').datePicker({clickInput:true});
>
> with:
>
> jQuery('.date-pick').datePicker({clickInput:true});
>
> Hope that helps,
>
> Kelvin :)
>
> syg6 wrote:
> > Thank you both, Kelvin and Klaus, for your replies.
>
> > Yes, I saw that page and after a quick read decided (incorrectly) it
> > was above my jQuery pay-grade and that it didn't apply to me. But as
> > it turns out, if I put the jQuery.noConflict(); line in my page before
> > calling the datePicker() function, the errors go away. Excellent!
>
> > ... but my calendar doesn't appear! :( No errors, but no calendar. I
> > think I have everything configured correctly:
>
> > I include the jquery-1.1.2.js, date.js, date_es.js,
> > jquery.dimensions.js, and datePicker.js libraries
> > I include the datePicker.css and demo.css style files
> > I include the snippet of js code that defines the datePicker - $
> > ('.date-pick').datePicker({clickInput:true});
> > I create an input that has the 'date-picker' style class
>
> > And the calendar doesn't appear. There's no link next to the input nor
> > is the input click-able. What could I be doing wrong?
>
> > Many thanks!
> > Bob

Reply via email to