}
}
public static void prompt(String caption, Date defaultValue,
final PromptCallback<Date> callback) {
final DatePicker datePicker = new DatePicker();
datePicker.setSelectedDate(defaultValue);
final MessageBox prompt = new MessageBox(caption) {
@Override
public void onClose(boolean result) {
hide();
if (result) {
callback.onResult(datePicker.getSelectedDate());
} else {
callback.onResult(null);
}
}
};