@dataloop-ai/components 0.18.130 → 0.18.132

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.130",
3
+ "version": "0.18.132",
4
4
  "exports": {
5
5
  ".": "./index.ts",
6
6
  "./models": "./models.ts",
@@ -78,6 +78,7 @@ import { CalendarDate, Calendar } from './models'
78
78
  import { defineComponent, PropType } from 'vue-demi'
79
79
  import { DateInterval } from './types'
80
80
  import { v4 } from 'uuid'
81
+ import moment from 'moment'
81
82
 
82
83
  const HOVER_TIMEOUT = 700
83
84
 
@@ -193,8 +194,12 @@ export default defineComponent({
193
194
  },
194
195
  updateModelValue(value: DateInterval) {
195
196
  if (this.disabled) return
196
- this.$emit('update:model-value', value)
197
- this.$emit('change', value)
197
+ const valueToUse = value
198
+ if (value && moment(value.from).isSame(value.to)) {
199
+ valueToUse.to = moment(value.from).endOf('day').toDate()
200
+ }
201
+ this.$emit('update:model-value', valueToUse)
202
+ this.$emit('change', valueToUse)
198
203
  },
199
204
 
200
205
  updateDateInterval(value: DateInterval) {
@@ -48,5 +48,5 @@ export const optionsValidator = (opts: DlSelectOptionType[]) => {
48
48
  export const getCaseInsensitiveInput = (label: string, input: string) => {
49
49
  const inputRegexp = new RegExp(input, 'gi')
50
50
  const position = label.search(inputRegexp)
51
- return label.slice(position, input.length)
51
+ return label.slice(position, position + input.length)
52
52
  }