@dataloop-ai/components 0.18.114 → 0.18.115

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": "@dataloop-ai/components",
3
- "version": "0.18.114",
3
+ "version": "0.18.115",
4
4
  "exports": {
5
5
  ".": "./index.ts",
6
6
  "./models": "./models.ts",
@@ -200,6 +200,7 @@ export default defineComponent({
200
200
  updateDateInterval(value: DateInterval) {
201
201
  if (this.disabled) return
202
202
  this.dateInterval = value
203
+ this.updateModelValue(value)
203
204
  },
204
205
 
205
206
  handleDateNext() {
@@ -100,19 +100,26 @@ export default defineComponent({
100
100
  methods: {
101
101
  handleClick(value: number) {
102
102
  const d = new CalendarDate()
103
- d.year(parseInt(this.title)).month(value).startOf('month')
103
+ d.year(parseInt(this.title)).month(value)
104
104
 
105
- if (!isInRange(this.availableRange, d)) return
105
+ const from = new CalendarDate(d)
106
+ const to = new CalendarDate(d)
107
+
108
+ from.startOf('month')
109
+ from.startOf('day')
110
+ to.endOf('month')
111
+ to.endOf('day')
112
+
113
+ if (!isInRange(this.availableRange, new CalendarDate(from))) return
114
+ if (!isInRange(this.availableRange, new CalendarDate(to))) return
106
115
 
107
- const date = d.toDate()
108
116
  const newDate = {
109
- from: date,
110
- to: date
117
+ from: from.toDate(),
118
+ to: to.toDate()
111
119
  }
112
120
  this.$emit('update:model-value', newDate)
113
121
  this.$emit('change', newDate)
114
122
  },
115
-
116
123
  handleMouseenter(value: number) {
117
124
  if (this.modelValue === null) return
118
125