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
Regular Contributor
Posts: 67
Registered: ‎08-16-2011
My Device: 7185
Accepted Solution

DateField Problem

Hello I want to know how to make a DateField that should not display time i.e. DateField should be like

 

21 oct 2010

 

only date should be display and it can be editable to user

 

 

 

Developer
Posts: 729
Registered: ‎05-04-2011
My Device: 9700

Re: DateField Problem

[ Edited ]

I haven't tried it, but try this:

DateField dateField = new DateField(label, date, new SimpleDateFormat("dd MMM YYYY"));

 

[EDIT]

To enable editing, you might need to add EDITABLE flag to the style:

DateField dateField = new DateField(label, date, new SimpleDateFormat("dd MMM YYYY"), Field.EDITABLE);