Skip to content

Commit

Permalink
Merge branch 'pu/je/tinebase_period_picker_week_1_2024' into '2024.11'
Browse files Browse the repository at this point in the history
fix(Tinebase): Show correct year for week 1 in period picker

See merge request tine20/tine20!6613
  • Loading branch information
sstamer committed Feb 25, 2025
2 parents 20928a3 + 118c108 commit 56b4ada
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 56b4ada

Please sign in to comment.