diff --git a/packages/nuxt-ripple-analytics/lib/index.ts b/packages/nuxt-ripple-analytics/lib/index.ts index 07c982584..05faed30d 100644 --- a/packages/nuxt-ripple-analytics/lib/index.ts +++ b/packages/nuxt-ripple-analytics/lib/index.ts @@ -676,7 +676,7 @@ export default { form_id: payload?.contextId, field_id: payload?.id, value: payload?.value, - type: 'date', + type: 'date-range', component: 'rpl-form-date-range', platform_event: 'update' }) diff --git a/packages/ripple-ui-forms/src/components/RplFormDateRange/RplFormDateRange.vue b/packages/ripple-ui-forms/src/components/RplFormDateRange/RplFormDateRange.vue index a353944f0..a7b9aeba6 100644 --- a/packages/ripple-ui-forms/src/components/RplFormDateRange/RplFormDateRange.vue +++ b/packages/ripple-ui-forms/src/components/RplFormDateRange/RplFormDateRange.vue @@ -113,13 +113,17 @@ const fromMax = computed(() => internalTo.value || props.max) const toMin = computed(() => internalFrom.value || props.min) const handleUpdate = (event) => { + const eventValue = + internalFrom.value || internalTo.value + ? `${internalFrom.value || null},${internalTo.value || null}` + : '' emitRplEvent( 'update', { ...event, id: props.id, label: props?.label, - value: sanitisePIIField(props.pii, props?.value) + value: sanitisePIIField(props.pii, eventValue) }, { global: true } )