Hi,
I am trying to create a UI to select dates. I have added a button box which will append calendar box to the panel box but every time I click, it will keep adding elements to the panel box. I want to hide the calendar box on second click. Is there a way to achieve this?

Here's my code:
sd=Today();
ed=Today();
New Window( "Query Date", <<Modal,
HListBox(
Panel1= PanelBox( "From Time"),
Button Box("click",
Panel1 << removeALl;
Panel1 << Append(scal1 = Calendar Box(, SetFunction(Function({this}, sd1=scal1<< Get Date) )));
)
)
);