@itfin/components 1.2.74 → 1.2.76

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.74",
3
+ "version": "1.2.76",
4
4
  "author": "Vitalii Savchuk <esvit666@gmail.com>",
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -183,7 +183,11 @@ class itfDatePickerInline extends Vue {
183
183
 
184
184
  @Watch('value')
185
185
  onValueChanged() {
186
- this.calendar.selectDate(this.valueAsLuxon && this.valueAsLuxon.toJSDate());
186
+ if (!this.valueAsLuxon) {
187
+ this.calendar && this.calendar.clear({ silent: true });
188
+ return;
189
+ }
190
+ this.calendar.selectDate(this.valueAsLuxon.toJSDate(), { silent: true });
187
191
  }
188
192
  }
189
193
  </script>
@@ -181,19 +181,20 @@ class itfDatePickerInline extends Vue {
181
181
  const lxDate1 = date[0].set({ hours: 0, minutes: 0, seconds: 0 });
182
182
  const lxDate2 = date[1].set({ hours: 23, minutes: 59, seconds: 59 });
183
183
  this.updateValue(lxDate1.toFormat(this.displayFormat), lxDate2.toFormat(this.displayFormat));
184
- this.calendar.selectDate([lxDate1.toJSDate(), lxDate2.toJSDate()]);
184
+ this.calendar.selectDate([lxDate1.toJSDate(), lxDate2.toJSDate()], { silent: true });
185
185
  }
186
186
 
187
187
  @Watch('value')
188
188
  onValueChanged() {
189
189
  if (!this.valueAsLuxon) {
190
+ this.calendar && this.calendar.clear({ silent: true });
190
191
  return;
191
192
  }
192
193
  const date1 = this.calendar.rangeDateFrom && DateTime.fromJSDate(this.calendar.rangeDateFrom).toFormat('yyyy-MM-dd')
193
194
  const date2 = this.calendar.rangeDateTo && DateTime.fromJSDate(this.calendar.rangeDateTo).toFormat('yyyy-MM-dd')
194
195
  if (date1 !== this.valueAsLuxon[0].toFormat('yyyy-MM-dd') || date2 !== this.valueAsLuxon[1].toFormat('yyyy-MM-dd')) {
195
196
  this.$nextTick(() => {
196
- this.calendar.selectDate(this.valueAsLuxon && [this.valueAsLuxon[0].toJSDate(), this.valueAsLuxon[1].toJSDate()]);
197
+ this.calendar.selectDate(this.valueAsLuxon && [this.valueAsLuxon[0].toJSDate(), this.valueAsLuxon[1].toJSDate()], { silent: true });
197
198
  });
198
199
  }
199
200
  }
@@ -61,7 +61,7 @@ storiesOf('Common', module)
61
61
  <br />
62
62
  <br />
63
63
 
64
- <itf-date-picker value-format="yyyy-MM-dd" :value="date" min-date="2023-05-01" v-model.lazy="date"></itf-date-picker>
64
+ <itf-date-picker value-format="yyyy-MM-dd" :value="date" clearable min-date="2023-05-01" v-model.lazy="date"></itf-date-picker>
65
65
 
66
66
  <br />
67
67
  <br />