diff --git a/api/js/etemplate/Et2Date/Et2Date.ts b/api/js/etemplate/Et2Date/Et2Date.ts
index 88f94ead87..726360533d 100644
--- a/api/js/etemplate/Et2Date/Et2Date.ts
+++ b/api/js/etemplate/Et2Date/Et2Date.ts
@@ -442,8 +442,18 @@ export class Et2Date extends Et2InputWidget(FormControlMixin(ValidateMixin(LitFl
this.clear();
return;
}
+ let date;
+ // handle relative time (eg. "+3600" or "-3600") used in calendar
+ if (typeof value === 'string' && (value[0] === '+' || value[0] === '-'))
+ {
+ date = new Date(this.getValue());
+ date.set_value(date.getSeconds() + parseInt(value));
+ }
+ else
+ {
+ date = new Date(value);
+ }
// Handle timezone offset, flatpickr uses local time
- let date = new Date(value);
let formatDate = new Date(date.valueOf() + date.getTimezoneOffset() * 60 * 1000);
if(!this._instance)
{
diff --git a/calendar/js/app.ts b/calendar/js/app.ts
index 7d17438d91..c6dc25f258 100644
--- a/calendar/js/app.ts
+++ b/calendar/js/app.ts
@@ -3235,7 +3235,7 @@ export class CalendarApp extends EgwApp
}
}
- // If current state matches a favorite, hightlight it
+ // If current state matches a favorite, highlight it
this.highlight_favorite();
// Update app header
@@ -3980,7 +3980,7 @@ export class CalendarApp extends EgwApp
{
if (!month_before_day)
{
- range += flatpickr.formatDate(first_format, "F");
+ range += egw.lang(flatpickr.formatDate(first_format, "F"));
}
if (first.getFullYear() != last.getFullYear() && datefmt[0] != 'Y')
{
@@ -4003,7 +4003,7 @@ export class CalendarApp extends EgwApp
if (month_before_day)
{
- range += flatpickr.formatDate(last_format, 'l');
+ range += egw.lang(flatpickr.formatDate(last_format, 'l'));
}
}
else if (last)
@@ -4024,7 +4024,7 @@ export class CalendarApp extends EgwApp
break;
case 'm':
case 'M':
- range += ' ' + flatpickr.formatDate(month_before_day || !last ? first_format : last_format, "l") + ' ';
+ range += ' ' + egw.lang(flatpickr.formatDate(month_before_day || !last ? first_format : last_format, "F")) + ' ';
break;
case 'Y':
if (datefmt[0] != 'm')
diff --git a/calendar/js/et2_widget_daycol.ts b/calendar/js/et2_widget_daycol.ts
index b1ec88559c..75496a156a 100644
--- a/calendar/js/et2_widget_daycol.ts
+++ b/calendar/js/et2_widget_daycol.ts
@@ -258,8 +258,8 @@ export class et2_calendar_daycol extends et2_valueWidget implements et2_IDetache
// Add timezone offset back in, or formatDate will lose those hours
const formatDate = new Date(this.date.valueOf() + this.date.getTimezoneOffset() * 60 * 1000);
- this.title.html('' + flatpickr.formatDate(formatDate, 'l') +
- '' + flatpickr.formatDate(formatDate, 'D') + '' +
+ this.title.html('' + egw.lang(flatpickr.formatDate(formatDate, 'l')) +
+ '' + egw.lang(flatpickr.formatDate(formatDate, 'D')) + '' +
flatpickr.formatDate(formatDate, 'd'));
}
this.title