Bug Tracker

Ticket #2108 (closed bug: fixed)

Opened 7 years ago

Last modified 7 years ago

Problem in Ui/Datepicker

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

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

comment:1 Changed 7 years ago by john

  • Owner set to paul
  • Component changed from core to ui

comment:2 Changed 7 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 7 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 7 years ago by paul

  • Status changed from new to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.