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 picker

Use a date picker to permit BlackBerry device users to select a date and time.



Supported since

BlackBerry Java SDK 5.0

More information

For more information about date and time pickers, see the UI Guidelines.


This screen shows a date picker.

import net.rim.device.api.ui.*;
import net.rim.device.api.ui.picker.*;
import net.rim.device.api.ui.component.*;
import net.rim.device.api.ui.container.*;
import net.rim.device.api.database.*;
import net.rim.device.api.io.*;
import java.util.*;

public class DatePickerDemo extends UiApplication
    public static void main(String[] args)
        DatePickerDemo theApp = new DatePickerDemo();
    public DatePickerDemo()
        pushScreen(new DatePickerDemoScreen());

class DatePickerDemoScreen extends MainScreen
    public DatePickerDemoScreen()
        setTitle("Date picker demo");
        add(new RichTextField("Trying Date Picker"));
        UiApplication.getUiApplication().invokeLater(new Runnable()
            public void run()
                DateTimePicker datePicker = DateTimePicker.createInstance();