code: public void setSettings(DatePickerSettings settings) {
          settings = (settings == null) ? new DatePickerSettings() : settings;
          settings.zSetParentDatePicker(this);
          this.settings = settings;
  
          // Apply needed settings from the settings instance to this date picker.
          // Note: CalendarPanel.zApplyBorderPropertiesList() is called from the calendar panel 
          // constructor so it will be run both for independent and date picker calendar panels.
          settings.zApplyGapBeforeButtonPixels();
          settings.zApplyAllowKeyboardEditing();
          settings.zApplyAllowEmptyDates();
          // Draw the text field indicators, because they may not have been drawn if the initialDate
          // was null. (This is because the text would not have changed in that case.)
          // This should be called after the DatePickerSettings have been saved.
          zDrawTextFieldIndicators();
          // Set an appropriate minimum width for the date picker text field.
          // This may use a calculated minimum width (default), or a programmer supplied minimum
          // width, as specified in the date picker settings.
          zSetAppropriateTextFieldMinimumWidth();
          // Redraw the date picker text field.
          settings.zDrawDatePickerTextFieldIfNeeded();
          // Apply the visibility of date picker components.
          zApplyVisibilityOfComponents();
      }
docs: setSettings, This will set the settings instance for this date picker. The previous settings
  will be deleted. Note that calling this function effectively re-initializes the picker
  component. All aspects of the component will be changed to match the provided settings. Any
  currently selected date will not be changed by this function.
  
  If the popup calendar panel is open up the time that this function is called, the open
  calendar will not be changed by this function. Calendar panels showing the new settings will
  be displayed only after a new popup calendar panel is opened.