code: public void setSettings(DatePickerSettings datePickerSettings) {
          // If no settings were supplied, then create a default settings instance.
          if (datePickerSettings == null) {
              datePickerSettings = new DatePickerSettings();
          }
          // Save the settings.
          this.settings = datePickerSettings;
          // If this is an independent calendar panel, store the parent calendar panel in the 
          // settings instance.
          if (isIndependentCalendarPanel) {
              settings.zSetParentCalendarPanel(this);
          }
  
          // If no date is selected, then apply the default displayedYearMonth from settings.
          if (displayedSelectedDate == null) {
              displayedYearMonth = settings.zGetDefaultYearMonthAsUsed();
          }
  
          // Apply the border properties settings.
          // This is applied regardless of whether the calendar panel was created by a date picker, 
          // or as an independent calendar panel.
          zApplyBorderPropertiesList();
          // Set the label indicators to their default states.
          zSetAllLabelIndicatorColorsToDefaultState();
          // If this is an an independent calendar panel, apply needed settings.
          // At the time of this writing, the "applied needed settings" included:
          // allow empty dates.
          if (isIndependentCalendarPanel) {
              // Note: CalendarPanel.zApplyBorderPropertiesList() is called from the calendar panel 
              // constructor so it will be run both for independent and date picker calendar panels.
              settings.zApplyAllowEmptyDates();
          }
          // Apply the button visibility settings to the buttons.
          zApplyVisibilityOfButtons();
          // Redraw the calendar.
          drawCalendar();
      }
docs: setSettings, This will set the settings instance for this calendar panel. 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.