*
* @return the date picker
*/
public DatePicker getDatePicker() {
if (menu == null) {
menu = displayTime ? new CalendarMenu() : new DateMenu();
getMenuDatePicker().addListener(Events.Select, new Listener<ComponentEvent>() {
public void handleEvent(ComponentEvent ce) {
focusValue = getValue();
Date date = menu instanceof DateMenu ? ((DateMenu) menu).getDate() : ((CalendarMenu) menu).getDate();
if (displayTime) {