/** creates a panel of datePickers in a popup, including setting up appropriate event handling.*/
private Widget createDatePickerPanel() {
datePopup = new PopupPanel(false /* doesn't close if you click away */, true /* modal */);
// TODO: Make it possible for the user to cancel, either by clicking away from
// the popup panel or by hitting an explicit cancel button.
startDatePicker = new DatePicker();
startTime = new TextBox();
hasSeparateEndDate = new CheckBox("Event has a separate end date & time");
endDatePicker = new DatePicker();
endTime = new TextBox();
endTime.setEnabled(false);
Grid table = new Grid(5, 2);
table.setWidget(1, 0, new Label("Start date:"));