02-01-2012 09:51 AM
I have code to create a new appointment. EndDate and StateDate are date objects. When I test the dates are not being created correctly. The appointment is always Wed, Dec 31, 1969 7:00 PM and the end is being shown as Wed, Dec 31, 1969 8:00 PM. I've tried the sample code where it uses a new Date object and also get the same issues. I've tested on a 9930 and a 9850.
Is this a bug or is there something else I need to do?
var appt = new blackberry.pim.Appointment();
if (objItem.Title != null) appt.summary = objItem.Title;
if(objItem.Location != null) appt.location = objItem.Location;
if (objItem.Description != null) appt.note = objItem.Description;
appt.end = objItem.EndDate;
appt.start = objItem.StateDate;
if (objItem.IsAllDay) appt.allDay = true;
var args = new blackberry.invoke.CalendarArguments(appt);
args.view = blackberry.invoke.CalendarArguments.VIEW_NEW;
02-04-2012 08:49 AM