jingrow-ui/docs/components/datepicker.md
jingrow c7bac1a7a0
Some checks failed
Publish on NPM / publish (push) Has been cancelled
Build and Deploy Storybook / build (push) Has been cancelled
Tests / test (push) Has been cancelled
initial commit
2025-10-24 00:40:30 +08:00

1.2 KiB

DatePicker

The DatePicker component is a prettier alternative to <input type="date">

Usage

Value: {{ date }}
<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 'jingrow-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