Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
| Prop | Type | Default | Description |
| ------------------- | ---------- | --------------------- | ------------------------------------------------- |
| `v-model` | `String` | `null` | The selected date (two-way data binding). |
| `displayFormat` | `String` | `'YYYY-MM-DD'` | The format used to display the date. |
| `displayFormat` | `String` | `'yyyy-MM-dd'` | The format used to display the date. |
| `disabled` | `Boolean` | `false` | Disables the date picker. |
| `placeholder` | `String` | `null` | Placeholder text for the input. |
| `yearContent` | `String` | `null` | Content to display for the year. |
Expand Down
32 changes: 2 additions & 30 deletions docs/guide/customization.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,42 +13,14 @@ Example:
}
```

## Slots

`vue3-datepick` supports named slots for customizing the internal content of the date picker.

### Custom Header

You can replace the default header with your own custom content:

```vue
<DatePick>
<template #header>
<h3>Select a Date</h3>
</template>
</DatePick>
```

### Custom Footer

You can also customize the footer content by using the `footer` slot:

```vue
<DatePick>
<template #footer>
<p>Custom Footer Content</p>
</template>
</DatePick>
```

## Date Format Customization

You can easily customize how the date is displayed using the `displayFormat` prop. The default format is `YYYY-MM-DD`.
You can easily customize how the date is displayed using the `displayFormat` prop. The default format is `yyyy-MM-dd`.

Example:

```vue
<DatePick v-model="selectedDate" display-format="DD/MM/YYYY" />
<DatePick v-model="selectedDate" display-format="dd/MM/yyyy" />
```

## Disable Specific Dates
Expand Down
4 changes: 2 additions & 2 deletions docs/guide/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ const selectedDate = ref('')

## Custom Date Format

Customize the date format that is displayed in the input field. For example, use `DD/MM/YYYY` instead of the default `YYYY-MM-DD`.
Customize the date format that is displayed in the input field. For example, use `dd/MM/yyyy` instead of the default `yyyy-MM-dd`.

```vue
<template>
<DatePicker v-model="selectedDate" display-format="DD/MM/YYYY" />
<DatePicker v-model="selectedDate" display-format="dd/MM/yyyy" />
</template>

<script setup lang="ts">
Expand Down
4 changes: 2 additions & 2 deletions docs/guide/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ In this example, the selected date is bound to the `selectedDate` variable using

You can easily change the format of the date displayed in the input by using the `displayFormat` prop.

Example: Set the date format to `MM/DD/YYYY`:
Example: Set the date format to `MM/dd/yyyy`:

```vue
<template>
<DatePicker v-model="selectedDate" display-format="MM/DD/YYYY" />
<DatePicker v-model="selectedDate" display-format="MM/dd/yyyy" />
</template>

<script setup lang="ts">
Expand Down
Loading