tags:

views:

12

answers:

1

I realized I have this with all combo box. I want it to have a default value so I did

TimeField field = new TimeField(); field.setFormat(DateTimeFormat.getFormat("HH:mm")); field.setRawValue("10:00");

But when i open the section. the value does not get set. It is still blank.

A: 

I m found the solution. I used following format its woks.

private TimeField fromTime = new TimeField();
    fromTime.setFormat(DateTimeFormat.getFormat("HH:mm"));
    fromTime.setIncrement(1);
    Time time = new Time();
    time.setText("00:00");
    fromTime.setValue(time);
    fromTime.setTriggerAction(TriggerAction.ALL);
    toolbar.add(fromTime);
lakshmi