From fbc77933a6b606a210b9e19c4a21da2356ed331f Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 16 Jan 2023 22:30:21 +0300 Subject: [PATCH 1/2] For Bug 60590 --- apps/documenteditor/main/app/controller/FormsTab.js | 6 ++++-- apps/documenteditor/main/app/view/FormSettings.js | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/apps/documenteditor/main/app/controller/FormsTab.js b/apps/documenteditor/main/app/controller/FormsTab.js index 30b1c1f9aa..ee5b1a1148 100644 --- a/apps/documenteditor/main/app/controller/FormsTab.js +++ b/apps/documenteditor/main/app/controller/FormsTab.js @@ -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(); diff --git a/apps/documenteditor/main/app/view/FormSettings.js b/apps/documenteditor/main/app/view/FormSettings.js index d00ee35a71..3b607d308b 100644 --- a/apps/documenteditor/main/app/view/FormSettings.js +++ b/apps/documenteditor/main/app/view/FormSettings.js @@ -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 { From d38a6099cea02670345739f9d8b744c6e5e70655 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 16 Jan 2023 22:35:14 +0300 Subject: [PATCH 2/2] [DE] Fix datetime form settings --- apps/documenteditor/main/app/view/FormSettings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/documenteditor/main/app/view/FormSettings.js b/apps/documenteditor/main/app/view/FormSettings.js index 3b607d308b..a350c0c04d 100644 --- a/apps/documenteditor/main/app/view/FormSettings.js +++ b/apps/documenteditor/main/app/view/FormSettings.js @@ -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',