Skip to content

Commit

Permalink
fix(Tinebase): Show correct year for week 1 in period picker
Browse files Browse the repository at this point in the history
  • Loading branch information
jevers committed Feb 19, 2025
1 parent 8061393 commit 118c108
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tine20/Tinebase/js/ux/form/PeriodPicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Ext.ux.form.PeriodPicker = Ext.extend(Ext.form.Field, {
case 'week':
// NOTE: '+1' is to ensure we display the ISO8601 based week where weeks always start on monday!
const wkStart = this.startDate.add(Date.DAY, this.startDate.getDay() < 1 ? 1 : 0);
dateString = wkStart.getWeekOfYear() + ' - ' + this.startDate.format('Y');
dateString = wkStart.getWeekOfYear() + ' - ' + (wkStart.getWeekOfYear() === 1 ? this.value.until.format('Y') : this.startDate.format('Y'))
break;
case 'month':
dateString = Date.getShortMonthName(this.startDate.getMonth()) + ' ' + this.startDate.format('Y');
Expand Down

0 comments on commit 118c108

Please sign in to comment.