views:

547

answers:

1

I have to combine the time value for TimeItem and date value from DateItem in smartgwt.In output I want the date object for java.util.Date.I tried to combine these two.I couldnot do that.

Sample code is :

DateItem date=new DateItem();
TimeItem time=new TimeItem();
DynamicForm form=new DynamicForm();
form.setFields(date,time);

// java.util.Date selectedDate= ? Here I need the output

Can anyone help on this? thanks

A: 

I haven't tried this, but this is my educated guess:

You can set the dateItem.setInputFormat(...) and dateItem.setDisplayFormat(...) using a date format that also includes time.

ivo