From 265fe39048200d69f256e3d9897ce0484f5366ec Mon Sep 17 00:00:00 2001 From: Kasper Legarth Date: Mon, 29 Aug 2022 11:26:17 +0200 Subject: [PATCH 1/5] Added functionality to show weeknumbers --- src/App.vue | 3 +++ src/DatePicker/HotelDatePicker.vue | 5 ++++ src/DatePicker/components/Month.vue | 16 ++++++++++- src/assets/scss/index.scss | 42 ++++++++++++++++++++++++++++- src/helpers.js | 14 ++++++++++ 5 files changed, 78 insertions(+), 2 deletions(-) diff --git a/src/App.vue b/src/App.vue index a7dd10cf..b57dc036 100644 --- a/src/App.vue +++ b/src/App.vue @@ -64,6 +64,7 @@ singleDaySelection
showYear
yearBeforeMonth
+ showWeekNumbers
startingDateValue: @@ -90,6 +91,7 @@ :showSingleMonth="showSingleMonth" :showYear="showYear" :showPrice="showPrice" + :showWeekNumbers="showWeekNumbers" :priceSymbol="priceSymbol" :yearBeforeMonth="yearBeforeMonth" :positionRight="positionRight" @@ -403,6 +405,7 @@ export default { showLastDateAvailable: false, showPeriodDates: false, showStartingDate: false, + showWeekNumbers: false, startingDate: `${today.getFullYear()}-${month}-${today.getDate()}`, showEndingDate: false, endingDate: `${today.getFullYear()}-${month}-${today.getDate()}`, diff --git a/src/DatePicker/HotelDatePicker.vue b/src/DatePicker/HotelDatePicker.vue index 3565244d..b00abcd4 100644 --- a/src/DatePicker/HotelDatePicker.vue +++ b/src/DatePicker/HotelDatePicker.vue @@ -135,6 +135,7 @@ :screenSize="screenSize" :showCustomTooltip="showCustomTooltip" :showPrice="showPrice" + :showWeekNumbers="showWeekNumbers" :disabledDates="disabledDates" :periodDates="periodDates" :sortedDisabledDates="sortedDisabledDates" @@ -335,6 +336,10 @@ export default { type: Boolean, default: true, }, + showWeekNumbers: { + type: Boolean, + default: false, + }, singleDaySelection: { type: Boolean, default: false, diff --git a/src/DatePicker/components/Month.vue b/src/DatePicker/components/Month.vue index 6dedfbab..b8855523 100644 --- a/src/DatePicker/components/Month.vue +++ b/src/DatePicker/components/Month.vue @@ -1,9 +1,12 @@