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

Java Development

Reply
Trusted Contributor
Posts: 138
Registered: ‎07-11-2010
My Device: Bold 9700
My Carrier: O2
Accepted Solution

is this possible?

is it possible to make the default BB calendar jump to a specific date programmatically?

Developer
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: is this possible?

Have you looked at the javadocs yet?

 

See the Invoke class and ApplicationArguments.

 

Specifically, CalendarArguments allows you to invoke the calendar to open on a specific date.

 

 

Trusted Contributor
Posts: 138
Registered: ‎07-11-2010
My Device: Bold 9700
My Carrier: O2

Re: is this possible?


RexDoug wrote:

Have you looked at the javadocs yet?

 

See the Invoke class and ApplicationArguments.

 

Specifically, CalendarArguments allows you to invoke the calendar to open on a specific date.

 

 


 

i've had a look at that before and i can only find arguments to change the calendar view.

Trusted Contributor
Posts: 138
Registered: ‎07-11-2010
My Device: Bold 9700
My Carrier: O2

Re: is this possible?

ok i think i got it:

 

 

    	Invoke.invokeApplication(Invoke.APP_TYPE_CALENDAR, new CalendarArguments(CalendarArguments.ARG_VIEW_DEFAULT));
    	Calendar.getInstance().setTime(new Date(900000));

 

the only problem is that i have the calendar currently open when calling the above code, so i don't see any change. how do i fix this?

 

Developer
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: is this possible?

Try this argument type, and set the date BEFORE calling invoke (not after)

 

CalendarArguments

public CalendarArguments(String arg,
                         Calendar date)
Creates a new CalendarArguments instance with provided arguments. Used to open the Calendar to a specific date.
Parameters:
arg - When set to one of ARG_VIEW_*, opens the calendar in the specified view on the specified date. When set to ARG_NEW, creates a new calendar appointment on the specified date.
date - A Calendar object representing the date to open the Calendar to

 

 

Trusted Contributor
Posts: 138
Registered: ‎07-11-2010
My Device: Bold 9700
My Carrier: O2

Re: is this possible?

worked. thanks a lot.