# BUG! Datebox popup closing prematurely and orphaning shadow.

dastultz
797 8

Run the following. Click on the button to pop up the calendar. Pick a date (a DAY not a MONTH). The pop-up closes and the label at the bottom updates. Good. Now pop up the calendar but click a MONTH. The pop-up closes and the label updates, but the shadow of the pop-up remains. Further pop ups produce more shadows! There are two problems here: I don't want the pop-up to close when I pick a month, in fact I don't want the change event fired when selecting a month, just when finally picking a date. Second, (or third, if you prefer) is the rather serious problem of shadow poo-poo.

Any workarounds would be appreciated as this really gums up the page.

Zk 3.6.1FL on
Mac: FF 3.0.10, Safari 3.2.1
Win XP: IE 7.0, FF 3.0.9

Thanks.
/Daryl

delete retag edit

## 3 Replies

iantsai
2755 1

I think it should be a bug, please post it to BUG tracker in SF.net

dastultz
797 8

Interestingly, changing the "container" from vbox to div fixes the premature closing and orphaned shadow problem. Of course my layout is messed up now...

/Daryl

dastultz
797 8

I suppose it would be helpful if I included the example code:

<window>
<vbox id="container">

<datebox id="db" onChange="go(event.getTarget())" />
<space height="300px" />
<zscript>
void go(Component db) {
Component comp = container.getFellowIfAny("result");
if (comp != null) container.removeChild(comp);
Label lbl = new Label(((Datebox) db).getValue().toString());
lbl.setId("result");
container.appendChild(lbl);
}
</zscript>
</vbox>
</window>


/Daryl

[hide preview]