Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
New Developer
wslfung
Posts: 23
Registered: ‎08-29-2012
My Device: Dev Alpha
Accepted Solution

invoke calendar

[ Edited ]

I've posted this question some time ago like in September/October timeframe here

 

I'm still trying to open the calendar from my app to a specific date, I'm able to launch the calendar app, but unable to point the calendar app to a specific date with the following code:

 

blackberry.invoke.invoke({
target : "sys.pim.calendar",
action : "bb.calendar.OPEN",
data : "{'date':'Wed Jan 23 2013'}",
}, function() {
alert("success");
}, function(e) {
alert("error");
});

 

Am I doing something wrong?

 

Wilson

Trusted Contributor
neilwick
Posts: 176
Registered: ‎01-20-2013
My Device: Bold 9790

Re: invoke calendar

[ Edited ]

I'm not sure what format the date has to be. Maybe

"Jan 01, 2015, 12:00"

  or even

new Date("Jan 01, 2015, 12:00")

 but

data :

definitely has to have an actual colon instead of the HTML entity for the colon, but I'm pretty sure that's what you meant, though, so it's probably the date format or something else in the data format.

Retired
erikjohnzon
Posts: 245
Registered: ‎09-21-2012
My Device: Q10

Re: invoke calendar

Did you check out some of the new docs in the Cascades section? Try this out: https://developer.blackberry.com/cascades/documentation/device_platform/invocation/calendar.html

 

Specifically: bb.calendar.VIEW section.

@erikjohnzon
erjohnson@blackberry.com
New Developer
wslfung
Posts: 23
Registered: ‎08-29-2012
My Device: Dev Alpha

Re: invoke calendar

the colon was translated by this forum. I have a proper two dot looking one in my code. I actually have read thru the doc linked and found that VIEW is opening an event. OPEN allows me to go to a specific view. I had searched and searched for webworks samples yet none is on the calendar that tells me how to something so simple. At least I thought it was.
Retired
erikjohnzon
Posts: 245
Registered: ‎09-21-2012
My Device: Q10

Re: invoke calendar

Forwarded internally.

@erikjohnzon
erjohnson@blackberry.com
Retired
erikjohnzon
Posts: 245
Registered: ‎09-21-2012
My Device: Q10

Re: invoke calendar

I got the attention of the Calendar people I will update you when I know more.

@erikjohnzon
erjohnson@blackberry.com
Retired
erikjohnzon
Posts: 245
Registered: ‎09-21-2012
My Device: Q10

Re: invoke calendar

Turns out they were hiding it from all of us. The API wasn't properly documented since we wrap it a bit different in WebWorks then they do in Cascades. Here is what worked for me, give it a shot:

 

blackberry.invoke.invoke({
target : "sys.pim.calendar",
action : "bb.calendar.OPEN", 
data : "?date=2012-09-24 01:01:00"
});
We will wrap this in the future to make it easier, but this will always work for you.
@erikjohnzon
erjohnson@blackberry.com
New Developer
wslfung
Posts: 23
Registered: ‎08-29-2012
My Device: Dev Alpha

Re: invoke calendar

thank you. Will try it tomorrow.
New Developer
wslfung
Posts: 23
Registered: ‎08-29-2012
My Device: Dev Alpha

Re: invoke calendar

works great, thanks