@stonecrop/aform 0.20.0 → 0.22.0

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.
@@ -57,7 +57,12 @@ watch(duration, newMs => {
57
57
  modelValue.value = newMs
58
58
  })
59
59
 
60
- const handleRange = (data: { start: Date; end: Date }) => {
60
+ const handleRange = (data: { start: Date; end: Date; source?: 'init' | 'user' }) => {
61
+ // Both time widgets announce their starting values as they mount, which ADateSelection turns
62
+ // into a range. That is not a range the user picked: acting on it wrote a 0ms duration into the
63
+ // model, and lit the summary strip, on first render.
64
+ if (data.source === 'init') return
65
+
61
66
  startDatetime.value = data.start
62
67
  endDatetime.value = data.end
63
68
  modelValue.value = duration.value
package/src/index.ts CHANGED
@@ -9,6 +9,7 @@ import ADate from './components/form/ADate.vue'
9
9
  import ADropdown from './components/form/ADropdown.vue'
10
10
  import ADatePicker from './components/form/ADatePicker.vue'
11
11
  import ADateTime from './components/form/ADateTime.vue'
12
+ import ADateTimeInput from './components/form/ADateTimeInput.vue'
12
13
  import ADateSelection from './components/form/ADateSelection.vue'
13
14
  import ADuration from './components/form/ADuration.vue'
14
15
  import ADateRange from './components/form/ADateRange.vue'
@@ -39,6 +40,7 @@ function install(app: App /* options */) {
39
40
  app.component('ADropdown', ADropdown)
40
41
  app.component('ADatePicker', ADatePicker)
41
42
  app.component('ADateTime', ADateTime)
43
+ app.component('ADateTimeInput', ADateTimeInput)
42
44
  app.component('ADateRange', ADateRange)
43
45
  app.component('ADateSelection', ADateSelection)
44
46
  app.component('AFieldset', AFieldset)
@@ -63,6 +65,7 @@ export {
63
65
  ADateSelection,
64
66
  ADuration,
65
67
  ADateTime,
68
+ ADateTimeInput,
66
69
  AFieldset,
67
70
  AFileAttach,
68
71
  AForm,