Skip to content

Commit

Permalink
fix: add missing prop for ADate
Browse files Browse the repository at this point in the history
  • Loading branch information
Rohan Bansal committed Apr 23, 2024
1 parent 961e30b commit 44dc06f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
15 changes: 2 additions & 13 deletions aform/src/components/form/ADate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,9 @@
</template>

<script setup lang="ts">
import { computed } from 'vue'
const props = withDefaults(
withDefaults(
defineProps<{
label: string
modelValue: any
required?: boolean
readonly?: boolean
uuid?: string
Expand All @@ -22,15 +19,7 @@ const props = withDefaults(
validation: () => ({ errorMessage: '&nbsp;' }),
}
)
const emit = defineEmits(['update:modelValue'])
const inputDate = computed({
get: () => {
return props.modelValue
},
set: newValue => {
emit('update:modelValue', newValue)
},
})
const inputDate = defineModel<number | Date>()
</script>

<style scoped>
Expand Down
2 changes: 1 addition & 1 deletion aform/stories/date.story.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<ADatePicker v-model="defaultDate" />
</Variant>
<Variant title="ADate">
<ADate v-model="defaultDate" />
<ADate label="Date" v-model="defaultDate" />
</Variant>
</Story>
</template>
Expand Down

0 comments on commit 44dc06f

Please sign in to comment.