开发者

How to make the format of a DateField to dd/mm/yyyy?

There is a DateField in my Form and I want the field value to be displayed in the format dd/mm/yyyy after dismissing ( choosing ) a date from the date-popup. How to achieve tha开发者_如何学Pythont ?


AFAIK you can't change the format of date in DateField component in java-me.


as already noted MIDP 2 does not provide API for that.

To simulate behavior like you describe, one has to manually convert the DateField's date to string like that and, say, put it into item label (by itemStateChanged event).

Or, if there's no need to let user choose date after done once, one can even replace date field with StringItem containing that dd/mm/yyyy.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜