@itfin/components 1.2.63 → 1.2.65

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itfin/components",
3
- "version": "1.2.63",
3
+ "version": "1.2.65",
4
4
  "author": "Vitalii Savchuk <esvit666@gmail.com>",
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -50,6 +50,7 @@
50
50
  :only-calendar="onlyCalendar"
51
51
  :display-format="displayFormat"
52
52
  :value-format="valueFormat"
53
+ :min-date="minDate"
53
54
  @input="selectInlineDate"
54
55
  ></itf-date-range-picker-inline>
55
56
  </div>
@@ -99,6 +100,7 @@ class itfDateRangePicker extends Vue {
99
100
  @Prop({ type: String, default: '' }) placeholder;
100
101
  @Prop({ type: String, default: '' }) prependIcon;
101
102
  @Prop({ type: String, default: 'bottom-start' }) placement;
103
+ @Prop({ type: [String, Date], default: '' }) minDate;
102
104
 
103
105
  focused = false;
104
106
 
@@ -34,6 +34,7 @@ class itfDatePickerInline extends Vue {
34
34
  @Prop({ type: String, default: ITFSettings.defaultDisplayDateFormat }) displayFormat;
35
35
  @Prop({ type: Boolean, default: false }) onlyCalendar;
36
36
  @Prop({ type: Object, default: () => ({}) }) customDays;
37
+ @Prop({ type: [String, Date], default: '' }) minDate;
37
38
  @Prop({
38
39
  type: Array,
39
40
  default: function () {
@@ -73,6 +74,7 @@ class itfDatePickerInline extends Vue {
73
74
  this.calendar = new AirDatepicker(this.$refs.calendar, {
74
75
  firstDay: 1,
75
76
  altFieldDateFormat: this.valueFormat,
77
+ minDate: this.minDate,
76
78
  locale: this.$i18n.locale === 'en' ? localeEn : localeUk,
77
79
  range: true,
78
80
  toggleSelected: false,
@@ -41,7 +41,7 @@
41
41
  </div>
42
42
 
43
43
  <itf-button block class="mb-3" :class="{'btn-whole': !isCurrentYear()}" :primary="isCurrentYear()" @click="onYearSelect(year)">
44
- Whole year
44
+ {{ $t('components.wholeYear') }}
45
45
  </itf-button>
46
46
 
47
47
  <div class="itf-periodpicker__quarters">
@@ -57,7 +57,7 @@
57
57
 
58
58
  <div class="itf-periodpicker__months">
59
59
  <itf-button
60
- class="itf-periodpicker__month"
60
+ class="itf-periodpicker__month px-1"
61
61
  v-for="month of quarter.Months"
62
62
  :key="month"
63
63
  :primary="isCurrentMonth(month)"
@@ -102,7 +102,7 @@ class itfPeriodPicker extends Vue {
102
102
  @Prop({ type: Boolean, default: false }) onlyCalendar;
103
103
  @Prop({ type: String, default: '' }) placeholder;
104
104
 
105
- year = DateTime.local().year;
105
+ year = null;
106
106
 
107
107
  focused = false;
108
108
 
@@ -151,6 +151,7 @@ class itfPeriodPicker extends Vue {
151
151
  placement: this.placement,
152
152
  appendTo: context,
153
153
  });
154
+ this.year = (this.value && this.value[0]) ? this.valueAsLuxon[0].year : DateTime.local().year;
154
155
  }
155
156
 
156
157
  get valueAsLuxon() {
@@ -222,7 +223,7 @@ class itfPeriodPicker extends Vue {
222
223
  return false;
223
224
  }
224
225
  return this.valueAsLuxon[0].hasSame(this.valueAsLuxon[0].startOf('year'), 'day')
225
- && this.valueAsLuxon[1].hasSame(this.valueAsLuxon[0].endOf('year'), 'day');
226
+ && this.valueAsLuxon[1].hasSame(this.valueAsLuxon[0].endOf('year'), 'day');
226
227
  }
227
228
 
228
229
  updateValue(start, end) {
package/src/locales/en.js CHANGED
@@ -55,5 +55,6 @@ module.exports = {
55
55
  dateSameOrAfter: 'The date should be same or after {date}',
56
56
  mediumTextLength: 'Text too large, maximum length 16Mb',
57
57
  addMore: 'Add more',
58
- close: 'Close'
58
+ close: 'Close',
59
+ wholeYear: 'Whole year',
59
60
  };
package/src/locales/uk.js CHANGED
@@ -55,5 +55,6 @@ module.exports = {
55
55
  dateSameOrAfter: 'Дата має бути такою ж або пізнішою {date}',
56
56
  mediumTextLength: 'Текст завеликий, максимальна довжина 16Mb',
57
57
  addMore: 'Додати ще',
58
- close: 'Закрити'
58
+ close: 'Закрити',
59
+ wholeYear: 'Весь рік',
59
60
  };