Opened 15 years ago

Closed 15 years ago

Last modified 14 years ago

#2108 closed bug (fixed)

Problem in Ui/Datepicker

Reported by: manjula Owned by: kbwood
Priority: major Milestone: 1.5
Component: ui.core Version: 1.2.1
Keywords: Cc:
Blocked by: Blocking:

Description

Hi,

I'm using rails 2.0.1 with jrails and jquery. I'm trying to use UI/Datepicker. While running i'm getting the error as

$.datepicker has no properties [Break on this error] for (attrName in $.datepicker._defaults) {

in ui.datepicker.js (line 1419)

Please tell me how to resolve it.

Change History (6)

comment:1 Changed 15 years ago by john

Component: coreui
Owner: set to paul

comment:2 Changed 15 years ago by kbwood

Owner: changed from paul to kbwood

Can you provide the code for or a URL to a page that demonstrates the problem?

comment:3 in reply to:  description Changed 15 years ago by stephancom

Replying to manjula:

I'm using rails 2.0.1 with jrails and jquery. I'm trying to use UI/Datepicker. While running i'm getting the error as $.datepicker has no properties

I think your problem (and mine, a few minutes ago, but without jrails) is that you're trying to call Datepicker before it gets instantiated. Datepicker has an onready event near the end that sets up the library. If, like me, you're including it later in your page (say, using content_for), but your event that wants to build a datepicker comes first, it dies.

Try moving your include for datapicker sooner in your page. That worked for me!

(btw, never heard of jrails before, sounds like something I've been looking for, thanks!)

comment:4 Changed 15 years ago by paul

Resolution: fixed
Status: newclosed

comment:5 Changed 15 years ago by (none)

Milestone: 1.2.2

Milestone 1.2.2 deleted

comment:6 Changed 14 years ago by paul

Milestone: 1.5
Note: See TracTickets for help on using tickets.