diff --git a/src/public/javascripts/dialogs/attributes.js b/src/public/javascripts/dialogs/attributes.js
index 694f0b2a8..6fe6fc18b 100644
--- a/src/public/javascripts/dialogs/attributes.js
+++ b/src/public/javascripts/dialogs/attributes.js
@@ -26,8 +26,7 @@ function AttributesModel() {
{ text: "Text", value: "text" },
{ text: "Number", value: "number" },
{ text: "Boolean", value: "boolean" },
- { text: "Date", value: "date" },
- { text: "DateTime", value: "datetime" }
+ { text: "Date", value: "date" }
];
this.multiplicityTypes = [
diff --git a/src/public/javascripts/services/note_detail.js b/src/public/javascripts/services/note_detail.js
index 39e5fbe16..a869b3f10 100644
--- a/src/public/javascripts/services/note_detail.js
+++ b/src/public/javascripts/services/note_detail.js
@@ -254,7 +254,7 @@ async function loadAttributes() {
}
for (const valueAttr of valueAttrs) {
- const inputId = "promoted-input-" + idx;
+ const inputId = "promoted-input-" + (idx++);
const $tr = $("
");
const $labelCell = $("").append(valueAttr.name);
const $input = $("")
@@ -268,6 +268,10 @@ async function loadAttributes() {
const $inputCell = $(" | ").append($input);
+ $tr.append($labelCell).append($inputCell);
+
+ $promotedAttributesContainer.append($tr);
+
if (valueAttr.type === 'label') {
if (definition.labelType === 'text') {
$input.prop("type", "text");
@@ -282,19 +286,26 @@ async function loadAttributes() {
$input.prop("checked", "checked");
}
}
- else if (definitionAttr.labelType === 'date') {
+ else if (definition.labelType === 'date') {
$input.prop("type", "text");
- $input.addClass("date");
+
+ $input.datepicker({
+ changeMonth: true,
+ changeYear: true,
+ dateFormat: "yy-mm-dd"
+ });
+
+ const $todayButton = $(" |