diff --git a/src/pat/recurrence/recurrence.js b/src/pat/recurrence/recurrence.js index 00a5cebd1..37c753641 100644 --- a/src/pat/recurrence/recurrence.js +++ b/src/pat/recurrence/recurrence.js @@ -690,6 +690,8 @@ const RecurrenceInput = function (conf, textarea) { function occurrenceAdd(event) { event.preventDefault(); var datevalue = self.$modalForm.find(".riaddoccurrence input#adddate").val(); + var date_parts = datevalue.split("-"); + datevalue += datevalue.length === 10 ? "T000000" : ""; var errorarea = self.$modalForm.find(".riaddoccurrence div.alert"); errorarea.text(""); errorarea.hide(); @@ -697,7 +699,6 @@ const RecurrenceInput = function (conf, textarea) { // Add date only if it is not already in RDATE if (!textarea["ical"].RDATE.includes(datevalue)) { textarea["ical"].RDATE.push(datevalue); - var date_parts = datevalue.split("-"); var $newdate = $(`