@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
|
@@ -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
|
-
|
|
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 =
|
|
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
|
-
|
|
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
package/src/locales/uk.js
CHANGED