Change Picker date format

60 views
Skip to first unread message

Caleb Nasio

unread,
Oct 14, 2014, 6:37:00 PM10/14/14
to codenameone...@googlegroups.com
Is it possible to change the date format on the codename one Picker to show only the year in full e.g 2014 or 1990 ? As of now it has this date format "M/d/yy" which in turn gives a date such as "Oct 15 214" to "10/15/14". Is there a way to change this date format?

Shai Almog

unread,
Oct 14, 2014, 10:32:52 PM10/14/14
to codenameone...@googlegroups.com
This looks differently on the devices. The picker is implemented natively there.

lang wul

unread,
Oct 15, 2014, 4:10:15 AM10/15/14
to codenameone...@googlegroups.com

Hi,Shai
   I have made my own 'Picker' class to get the date format I want   by copy the code of class 'Picker';Because the format shows in simulator just like  "14-10-15"  which I want just "2014-10-15"; But according to your said ,the final showing is depended on the implement  on the devices?Then what I do just meaninglessly?

Shai Almog

unread,
Oct 15, 2014, 8:06:43 AM10/15/14
to codenameone...@googlegroups.com
Hi,
you can derive picker and format it any way you want. The native portion you can't customize though.
Reply all
Reply to author
Forward
0 new messages