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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Cascades Development

Reply
Regular Contributor
marcossit
Posts: 84
Registered: ‎07-19-2012
My Carrier: Movistar-Venezuela

[Help] Time and Information BlackBerry in my application

Hello friends, how are you? Happy weekend.

I have a problem, well two problems the first simple

This code is to display the date.

 

 Label {
id: title
 text: {
var today = new Date();
 "Hoy es: " + (today.getDate() + "/" + today.getMonth() +1) + "/" + (today.getFullYear());
    }
   }
            

 ut do not get the command to display the time. As serious to show time ..?

 

My other question is, implement the BatterySample in my application and it works perfectly, it looks great. But I want to add

1) Percentage or battery level in Number
2) The pin from my BlackBerry
3) Serial
4) BlackBerry OS
5) Model

Not understand the examples correctly, since no documents but not appreciated as implement.

Download my App for BB10 http://appworld.blackberry.com/webstore/content/134103/
Please use plain text.
Regular Contributor
marcossit
Posts: 84
Registered: ‎07-19-2012
My Carrier: Movistar-Venezuela

Re: [Help] Time and Information BlackBerry in my application

[Help] Time and Information BlackBerry in my application

Download my App for BB10 http://appworld.blackberry.com/webstore/content/134103/
Please use plain text.
Developer
HorizonXP
Posts: 131
Registered: ‎03-28-2011
My Carrier: Bell

Re: [Help] Time and Information BlackBerry in my application

Marco, you should break up your post into 2, since you're asking 2 questions. I'll address the first one:

 

import bb.cascades 1.0                                                         
                                                                               
Page {                                                                         
    Container {                                                                
        Label {                                                                
            text: {                                                            
                var today = new Date();                                        
                "Hoy es: " + (today.getDate() + "/" + (today.getMonth()+1) + "/" + today.getFullYear());                                                       
            }
        }    
    }     
}     

 That code works perfectly for me.


Founder of Pulsecode Inc. and taab
Authomator - Two-factor authentication codes on BlackBerry 10 - http://www.xitijpatel.com/ - Follow @xitijpatel
Is there a helpful or useful post in this thread? Click the thumbs up on it so that other people can find it more easily!
Please use plain text.