Thanks for pointing that out.
I applied your exact recommendation but I still get the same error
message.

On Aug 3, 10:50 pm, Michael Nosal <[email protected]> wrote:
> The error message suggests that something that should be a Date object, 
> actually isn't (there is no method 'getTime')
>
> In your addBreakpoint function, you pass an object to the 
> Timeline.DefaultEventSource.Event constructor. In this object, the value you 
> have for start is a String, when it should be a Date. Normally, calling 
> eventSource.loadJSON() would convert the start/end strings in your JSON to 
> date objects for you before constructing a new 
> Timeline.DefaultEventSource.Event. So you just need to convert start to a 
> Date:
>
> function addBreakpoint()
> {
>     var evt = new Timeline.DefaultEventSource.Event ({
>     start: new Date("Aug 03 2011 00:00:00 GMT-0600"),
>     instant : true,
>     text : "An event",
>     description : "A description"});
>
> This should work fine.
> --Mike
>
> On Aug 3, 2011, at 12:06 PM, Froggy wrote:> Hi Everyone,
>
> > Just started using Timeline and having a problem I just can't find
> > information about.
> > I am trying to add events manually that the user selects and display
> > them dynamically, not sure I got the grasp of everything.
>
> > I get the following error in Chrome's Developer Tools:
> > Uncaught TypeError: Object #<Object> has no method 'getTime'
> > bundle.js:4492
>
> > Here is the code I have:
> > ...
> > //Add Event
> > function addBreakpoint()
> > {
> >    var date = document.getElementById("eventDatepicker").value;
> >    var evt = new Timeline.DefaultEventSource.Event ({
> >    start: "Aug 03 2011 00:00:00 GMT-0600",  //Hardcoded for the time
> > being using Timeline default date
> >        instant : true,
> >        text : "An event",
> >        description : "A description",
> > });
> > eventSource.add(evt);
> > tl.paint();
> > }
>
> > Thanks in advance for any help you can provide!

-- 
You received this message because you are subscribed to the Google Groups 
"SIMILE Widgets" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/simile-widgets?hl=en.

Reply via email to