开发者

Getting individual values from GWT datebox?

开发者 https://www.devze.com 2023-01-06 23:10 出处:网络
I\'m a newbie so please help me in this. I have a datebox with a default date format and its working and d开发者_如何学Goisplaying selected date in the box as expected.

I'm a newbie so please help me in this. I have a datebox with a default date format and its working and d开发者_如何学Goisplaying selected date in the box as expected.

Now, I need to get individual values from whats being displayed/selected, i.e., month, date, year. I need them to be used to query something in database.

Example : Displayed as July 14th, 2010. I require after displaying it in box, the numeric values as 7(for month), 14(for date), 2010(for the year).

Plese help, I'll be really thankful.

_ Chirayu Diwan


DateBox has a method getValue() which returns an obect of type java.util.Date. This class has individual method to get getYear(), getMonth() (offsets with 0, so 0 is January) and getDay().

0

精彩评论

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