@ignatremizov/vue-tailwind-datepicker 2.1.1 → 2.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +38 -0
- package/dist/types.d.ts +1 -0
- package/dist/vue-tailwind-datepicker.js +4025 -3974
- package/dist/vue-tailwind-datepicker.umd.cjs +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -333,6 +333,44 @@ Hooks are stable across locales and also apply when `selector-mode` is enabled:
|
|
|
333
333
|
|
|
334
334
|
Hooks are additive: selected/range/disabled/today semantics remain unchanged unless your host CSS explicitly overrides them.
|
|
335
335
|
|
|
336
|
+
## Highlighted Day Hooks
|
|
337
|
+
|
|
338
|
+
Use `highlightDates` to mark specific calendar days with a stable hook class.
|
|
339
|
+
|
|
340
|
+
```vue
|
|
341
|
+
<script setup>
|
|
342
|
+
import dayjs from 'dayjs'
|
|
343
|
+
import { ref } from 'vue'
|
|
344
|
+
|
|
345
|
+
const value = ref('2025-06-15 00:00:00')
|
|
346
|
+
const highlightedDates = [
|
|
347
|
+
new Date(2025, 5, 7),
|
|
348
|
+
'2025-06-15',
|
|
349
|
+
dayjs('2025-06-21'),
|
|
350
|
+
]
|
|
351
|
+
</script>
|
|
352
|
+
|
|
353
|
+
<template>
|
|
354
|
+
<vue-tailwind-datepicker
|
|
355
|
+
v-model="value"
|
|
356
|
+
as-single
|
|
357
|
+
:highlight-dates="highlightedDates"
|
|
358
|
+
/>
|
|
359
|
+
</template>
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
- `highlightDates` accepts an array of `Date`, `dayjs`, or strings matching the configured `formatter.date` or its date-only form.
|
|
363
|
+
- Matching is date-only (`YYYY-MM-DD`), so time values are ignored.
|
|
364
|
+
- Matching cells receive the `vtd-highlighted` class.
|
|
365
|
+
|
|
366
|
+
```css
|
|
367
|
+
.vtd-datepicker-date.vtd-highlighted {
|
|
368
|
+
color: #0f766e;
|
|
369
|
+
}
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
The hook is additive, so highlighted cells still keep their normal selected/range/disabled/today behavior unless your host CSS overrides it.
|
|
373
|
+
|
|
336
374
|
## Direct Year Input (Selector Mode)
|
|
337
375
|
|
|
338
376
|
Use `directYearInput` to allow typing a year directly in selector mode. The feature is opt-in and defaults to `false`.
|