From 9e6744d1e33b37e0d23eea5869ccac3ff37f7d53 Mon Sep 17 00:00:00 2001 From: Lauri Ojansivu Date: Mon, 4 Oct 2021 18:13:00 +0300 Subject: [PATCH] Added week numbers to dates at card, minicard, Custom Field dates, DatePicker and Calendar. Part 2. Thanks to xet7 ! --- client/components/cards/cardDate.js | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/client/components/cards/cardDate.js b/client/components/cards/cardDate.js index 46a8b7790..87b12b659 100644 --- a/client/components/cards/cardDate.js +++ b/client/components/cards/cardDate.js @@ -288,12 +288,25 @@ class CardCustomFieldDate extends CardDate { }); } - classes() { - return 'customfield-date'; + showWeek() { + return this.date.get().week().toString(); + } + + showDate() { + // this will start working once mquandalle:moment + // is updated to at least moment.js 2.10.5 + // until then, the date is displayed in the "L" format + return this.date.get().calendar(null, { + sameElse: 'llll', + }); } showTitle() { - return ''; + return `${this.date.get().format('LLLL')}`; + } + + classes() { + return 'customfield-date'; } events() {