开发者

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

开发者 https://www.devze.com 2023-03-22 02:52 出处:网络
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 ?AF

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

精彩评论

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

关注公众号