@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
|
@@ -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)
|
|
103
|
+
d.year(parseInt(this.title)).month(value)
|
|
104
104
|
|
|
105
|
-
|
|
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:
|
|
110
|
-
to:
|
|
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
|
|