protected String toDaysOfWeekDisabledString(final DatePickerDayOfWeek... datePickerDayOfWeeks) {
    this.daysOfWeekDisabled = datePickerDayOfWeeks;

    final StringBuilder builder = new StringBuilder();

    if (datePickerDayOfWeeks != null) {
      int i = 0;
      for (final DatePickerDayOfWeek dayOfWeek : datePickerDayOfWeeks) {
        builder.append(dayOfWeek.getValue());

        i++;
        if (i < datePickerDayOfWeeks.length) {
          builder.append(",");
        }
      }
    }
    return builder.toString();
  }
  protected void configure(final Widget w, final Widget container) {
    w.getElement().setAttribute("data-date-format", format);

    // If configuring not for the first time, datepicker must be removed first.
    this.remove(w.getElement());

    configure(
        w.getElement(),
        container.getElement(),
        format,
        weekStart.getValue(),
        toDaysOfWeekDisabledString(daysOfWeekDisabled),
        autoClose,
        startView.getValue(),
        minView.getValue(),
        showTodayButton,
        highlightToday,
        keyboardNavigation,
        forceParse,
        viewSelect.getValue(),
        language.getCode(),
        position.getPosition());
  }