Would you like to tell us how we are doing?

You bet No thanks

Sorry about the red box, but we really need you to update your browser. Read this excellent article if you're wondering why we are no longer supporting this browser version. Go to Browse Happy for browser suggestions and how to update.

Choice field: date field

Use a date field to display the date and time.



Supported since

BlackBerry Java SDK 3.6

More information

For more information about date fields, see the UI Guidelines.


This screen shows a date field.

import net.rim.device.api.ui.*;
import net.rim.device.api.ui.component.*;
import net.rim.device.api.ui.container.*;

public class DateFieldDemo extends UiApplication 
    public static void main(String[] args) 
        DateFieldDemo theApp = new DateFieldDemo(); 
    public DateFieldDemo() 
        pushScreen(new DateFieldDemoScreen()); 
class DateFieldDemoScreen extends MainScreen 
    public DateFieldDemoScreen() 
        setTitle("Date Field Demo"); 
        add(new DateField("Date and Time: ", 
            System.currentTimeMillis(), DateField.DATE_TIME));