code: protected void onDateBoxKeyPress(KeyUpEvent event) {
  
          switch (event.getNativeEvent().getKeyCode()) {
              case KeyCodes.KEY_CTRL:
              case KeyCodes.KEY_SHIFT:
              case KeyCodes.KEY_ALT:
              case KeyCodes.KEY_LEFT:
              case KeyCodes.KEY_RIGHT:
                  break;
              case KeyCodes.KEY_ENTER:
              case KeyCodes.KEY_TAB:
              case KeyCodes.KEY_ESCAPE:
              case KeyCodes.KEY_UP:
                  updateFromTextBox(false);
                  hidePopup();
                  break;
              case KeyCodes.KEY_DOWN:
                  showPopup();
                  break;
              default:
                  hidePopup();
                  Scheduler.get().scheduleDeferred(new ScheduledCommand() {
  
                      public void execute() {
  
                          updateCloseBehavior();
                          if (isValideDateBox() || allowInvalidValue()) {
                              setErrorMessage(null);
                              fireChange(getValue(), true);
                          }
                      }
                  });
                  break;
          }
      }
docs: The date box on key down action.<p>
  <ul>
  <li>If enter or tab is pressed in the date box the date time
  picker should be updated with the value from the date box.</li>
  <li>If the escape key is pressed the picker should be hided.</li>
  <li>If the up key is pressed the value should be taken from the date box.</li>
  <li>If the down key is pressed the picker should be hided.</li>
  </ul>
  
  @param event the key down event