Bug Tracker

Ticket #2108 (closed bug: fixed)

Opened 1 year ago

Last modified 9 months ago

Problem in Ui/Datepicker

Reported by: manjula Assigned to: kbwood
Type: bug Priority: major
Milestone: 1.2.2 Component: ui
Version: 1.2.1 Keywords:
Cc: Needs: Review

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.

Attachments

Change History

  Changed 11 months ago by john

  • owner set to paul
  • component changed from core to ui

  Changed 11 months 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?

in reply to: ↑ description   Changed 10 months 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!)

  Changed 9 months ago by paul

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