hgs1906 / smartgwt

Automatically exported from code.google.com/p/smartgwt
0 stars 0 forks source link

Add methods to set autoHide autoClose on DateChooser #481

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When using a DateItem and one wants to customize the DateChooser, the chooser 
must be configured. When doing this, we lose the autoClose feature of the 
DateChooser (== close when user clicks outside of the DateChooser).
Same with autoHide (though this is default true).

There are no methods in SmartGWT
DateChooser.setAutoHide(boolean)
DateChooser.setAutoClose(boolean)

Workaround: create your own class extending DateChooser:
private class MyDateChooser extends DateChooser {
    public MyDateChooser() {
        setAttribute("autoClose", true, true);
    }
}

Original issue reported on code.google.com by levi.mai...@gmail.com on 30 Jun 2010 at 8:18

GoogleCodeExporter commented 9 years ago

Original comment by smartgwt...@gmail.com on 17 Dec 2010 at 8:58

GoogleCodeExporter commented 9 years ago
You can simply use:
DateChooser dateChooser = new DateChooser();
dateChooser.setProperty("autoClose", true);

Original comment by cristian...@stibo.ro on 6 Aug 2012 at 2:38