setValue(value) {
    const saveAsText = (this.settings.saveAs === 'text');
    if (!this.calendar) {
      value = value ? formatDate(value, convertFormatToDayjs(this.settings.format), this.timezone, convertFormatToDayjs(this.valueMomentFormat)) : value;
      return super.setValue(value);
    }

    // If the component is a textfield that does not have timezone information included in the string value then skip
    // the timezone offset
    this.settings.skipOffset = this.component.type === 'textfield' && !hasEncodedTimezone(value);

    if (value) {
      if (!saveAsText && this.settings.readOnly) {
        this.calendar.setDate(dayjsDate(value, this.valueFormat, this.timezone).format(), false);
      }
      else if (this.isValueISO8601(value)) {
        this.calendar.setDate(value, false);
      }
      else {
        this.calendar.setDate(moment(value, this.valueMomentFormat).toDate(), false);
      }
    }
    else {
      this.calendar.clear(false);
    }
  }
Set the selected date value.
@param {*} value - The value to set.
@returns {void}