From e1045077418aa1e0744866ea1aca46e896cf203e Mon Sep 17 00:00:00 2001 From: Michael Ohotnikov <43218906+OhotnikovM@users.noreply.github.com> Date: Fri, 29 Oct 2021 13:37:50 +0300 Subject: [PATCH 1/2] Error due to l10n exports with default field. Hello! We have an error due to this part of code because it is outside the component and after build it causes error because this code use global l10n module in bundle with nested `default` filed. That is we should apply it like `l10n.default.en` and etc or replace this code into component module. Our team would be eternally grateful if you approve this pull request! --- .../cv-date-picker/cv-date-picker.vue | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/packages/core/src/components/cv-date-picker/cv-date-picker.vue b/packages/core/src/components/cv-date-picker/cv-date-picker.vue index e27d47fb1..795e47048 100644 --- a/packages/core/src/components/cv-date-picker/cv-date-picker.vue +++ b/packages/core/src/components/cv-date-picker/cv-date-picker.vue @@ -81,15 +81,7 @@ import { uidMixin, themeMixin, carbonPrefixMixin } from '../../mixins'; import Calendar16 from '@carbon/icons-vue/es/calendar/16'; import CvWrapper from '../cv-wrapper/_cv-wrapper'; -// Weekdays shorthand for english locale -l10n.en.weekdays.shorthand.forEach((day, index) => { - const currentDay = l10n.en.weekdays.shorthand; - if (currentDay[index] === 'Thu' || currentDay[index] === 'Th') { - currentDay[index] = 'Th'; - } else { - currentDay[index] = currentDay[index].charAt(0); - } -}); + export default { name: 'CvDatePicker', @@ -338,6 +330,17 @@ export default { this.$refs.todate.click(); }, }, + created() { + // Weekdays shorthand for english locale + l10n.en.weekdays.shorthand.forEach((day, index) => { + const currentDay = l10n.en.weekdays.shorthand; + if (currentDay[index] === 'Thu' || currentDay[index] === 'Th') { + currentDay[index] = 'Th'; + } else { + currentDay[index] = currentDay[index].charAt(0); + } + }); + }, mounted() { this.initFlatpickr(); this.checkSlots(); From e648a88eec211ce0e4476b50fe6fb97460e94e99 Mon Sep 17 00:00:00 2001 From: Lee Chase Date: Tue, 2 Nov 2021 17:29:40 +0000 Subject: [PATCH 2/2] Correct formatting --- packages/core/src/components/cv-date-picker/cv-date-picker.vue | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/core/src/components/cv-date-picker/cv-date-picker.vue b/packages/core/src/components/cv-date-picker/cv-date-picker.vue index 795e47048..406b3e8c5 100644 --- a/packages/core/src/components/cv-date-picker/cv-date-picker.vue +++ b/packages/core/src/components/cv-date-picker/cv-date-picker.vue @@ -81,8 +81,6 @@ import { uidMixin, themeMixin, carbonPrefixMixin } from '../../mixins'; import Calendar16 from '@carbon/icons-vue/es/calendar/16'; import CvWrapper from '../cv-wrapper/_cv-wrapper'; - - export default { name: 'CvDatePicker', mixins: [uidMixin, themeMixin, carbonPrefixMixin],