Merge pull request #2189 from ONLYOFFICE/fix/bugfix

Fix/bugfix
This commit is contained in:
Julia Radzhabova
2023-01-17 11:14:51 +03:00
committed by GitHub
2 changed files with 7 additions and 4 deletions

View File

@ -201,11 +201,13 @@ define([
} else if (type == 'combobox' || type == 'dropdown')
this.api.asc_AddContentControlList(type == 'combobox', oPr, oFormPr);
else if (type == 'datetime'){
var props = new AscCommon.CContentControlPr();
var props = new AscCommon.CContentControlPr(),
datePr = new AscCommon.CSdtDatePickerPr();
oPr = new AscCommon.CSdtTextFormPr();
props.put_TextFormPr(oPr);
props.put_FormPr(oFormPr);
props.put_DateTimePr(new AscCommon.CSdtDatePickerPr());
props.put_DateTimePr(datePr);
props.put_PlaceholderText(datePr.get_String());
this.api.asc_AddContentControlDatePicker(props);
} else if (type == 'text') {
var props = new AscCommon.CContentControlPr();

View File

@ -645,7 +645,7 @@ define([
cls: 'input-group-nr',
menuCls: 'menu-absolute',
menuStyle: 'min-width: 195px; max-height: 190px;',
editable: true,
editable: false,
data: [],
dataHint: '1',
dataHintDirection: 'bottom',
@ -1482,7 +1482,7 @@ define([
}
this.updateDateFormats(this.cmbLang.getValue());
var format = datePr.get_DateFormat();
this.cmbDateFormat.setValue(format);
this.cmbDateFormat.setValue(format, datePr.get_String());
this._state.DateFormat=format;
}
@ -1770,6 +1770,7 @@ define([
formDatePr.put_DateFormat(this.cmbDateFormat.getValue());
formDatePr.put_LangId(this.cmbLang.getValue());
props.put_DateTimePr(formDatePr);
props.put_PlaceholderText(formDatePr.get_String());
this.api.asc_SetContentControlProperties(props, this.internalId);
this.fireEvent('editcomplete', this);
} else {