On this page
DatePicker
The DatePicker component is a prettier alternative to <input type="date">
Usage
Value:
vue
<template>
<DatePicker v-model="date" />
<DatePicker
v-model="date"
placeholder="Select your birthday"
:formatValue="(val) => val.split('-').reverse().join('-')"
/>
</template>
<script setup>
import { ref } from 'vue'
import { DatePicker } from 'frappe-ui'
let date = ref(null)
</script>
Props
Name | Default | Value | Description |
---|---|---|---|
placeholder | null | String | |
formatValue | null | Function | Function to format the date value for display |