code: public DatePicker setDateFormat(SimpleDateFormat dateFormat) {
          this.dateFormat = dateFormat;
          for (Validator validator : this.getValidators()) {
              if (validator instanceof DateValidator) {
                  ((DateValidator) validator).setDateFormat(dateFormat);
              }
          }
          return this;
      }
docs: Sets the date format for this element.
  It also changes the date format for the date validator, if present.
  @param dateFormat Date format
  @return This element