How to add DateField to the Toolbar using gwtext or gxt

162 views Asked by At

I need to add two Date Fields for From Date and To Date and a Button to a toolbar using gxt or gwtext.Please suggest how to do this.

UPDATE

I am creating one grid in gxt.I need to add a toolbar at top of the Grid.I am creating the Toolbar as

ToolBar toolBar = new ToolBar();

And then I created two DateFields as

    DateField fromDate=new DateField();
    DateField toDate=new DateField();

    fromDate.setFieldLabel("From Date");
    fromDate.setHeight(23);
    fromDate.setWidth(179);

    toDate.setFieldLabel("To Date");
    toDate.setHeight(23);
    toDate.setHeight(179);

But now i want to add this two Date Fields along with one button to the toolbar and need to add that toolbar at the top of the Grid Panel.

Please guide.

1

There are 1 answers

0
Ahmed Adel On

You can simply add the two date fields as following:

    toolBar.add(fromDate);
    toolbar.add(new SeparatorToolItem());
    toolBar.add(toDate);