0

I have a problem with anytime.js ; The input field exists

<input type="text" value="" name="step_dimension_value" >

this is how i called the plugin:

jQuery('input[name="step_dimension_value"]').AnyTime_picker({ 
    format: "%H:%i", 
    labelTitle: "Hora",
    labelHour: "Hora", 
    labelMinute: "Minuto" 
});

The error is (from Firebug console):

" TypeError: off is null [Break On This Error]
var left = off.left; " in anytime.js?ver=1 (line 3062)

can you please help me ?

* EDIT *

I think i have the answer:

In my opinion there is a problem in the anytime.js datepicker; Fortunately it can be very easily worked around.

How to reproduce: - If the call to anytime picker is done using jquery selector, (Like : jQuery('input[name="step_dimension_value"]').AnyTime_picker(....)) and the input does not have an id, the error will happen;

Workaround: - add an id to the input element; I tested it and this works.

1 Answers1

1

That's not a bug, it's by design, and mentioned in the Troubleshooting Tips near the end of the project home page here:

www.ama3.com/anytime/#fixBehavior

Andrew M. Andrews III
  • 1,989
  • 18
  • 23