@ignatremizov/vue-tailwind-datepicker 2.1.0 → 2.1.2
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/package.json +33 -8
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`.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ignatremizov/vue-tailwind-datepicker",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.1.
|
|
4
|
+
"version": "2.1.2",
|
|
5
5
|
"description": "A Vue 3 datepicker component using Tailwind CSS and Day.js",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Ignat Remizov",
|
|
@@ -203,20 +203,20 @@
|
|
|
203
203
|
"vite-plugin-css-injected-by-js": "^3.3.1"
|
|
204
204
|
},
|
|
205
205
|
"devDependencies": {
|
|
206
|
-
"@antfu/eslint-config": "^7.
|
|
206
|
+
"@antfu/eslint-config": "^7.7.3",
|
|
207
207
|
"@commitlint/cli": "^20.4.1",
|
|
208
208
|
"@commitlint/config-conventional": "^20.4.1",
|
|
209
|
-
"@headlessui/vue": "https://github.com/ignatremizov/headlessui/releases/download/v1.7.24-iremizov.
|
|
209
|
+
"@headlessui/vue": "https://github.com/ignatremizov/headlessui/releases/download/v1.7.24-iremizov.2/headlessui-vue-1.7.24-iremizov.2.tgz",
|
|
210
210
|
"@semantic-release/changelog": "^6.0.3",
|
|
211
211
|
"@semantic-release/commit-analyzer": "^13.0.1",
|
|
212
212
|
"@semantic-release/git": "^10.0.1",
|
|
213
|
-
"@semantic-release/npm": "^13.1.
|
|
213
|
+
"@semantic-release/npm": "^13.1.5",
|
|
214
214
|
"@semantic-release/release-notes-generator": "^14.1.0",
|
|
215
215
|
"@tailwindcss/forms": "^0.5.11",
|
|
216
|
-
"@tailwindcss/postcss": "^4.
|
|
216
|
+
"@tailwindcss/postcss": "^4.2.2",
|
|
217
217
|
"@types/fs-extra": "^11.0.4",
|
|
218
218
|
"@types/node": "^20.8.10",
|
|
219
|
-
"@vitejs/plugin-vue": "^6.0.
|
|
219
|
+
"@vitejs/plugin-vue": "^6.0.5",
|
|
220
220
|
"@vue/test-utils": "^2.4.6",
|
|
221
221
|
"axe-core": "^4.11.1",
|
|
222
222
|
"dayjs": "^1.11.19",
|
|
@@ -225,7 +225,7 @@
|
|
|
225
225
|
"eslint-plugin-import-newlines": "^1.4.1",
|
|
226
226
|
"fs-extra": "^11.3.3",
|
|
227
227
|
"husky": "^8.0.3",
|
|
228
|
-
"jsdom": "^
|
|
228
|
+
"jsdom": "^29.0.1",
|
|
229
229
|
"postcss": "^8.4.49",
|
|
230
230
|
"semantic-release": "^25.0.3",
|
|
231
231
|
"tailwindcss": "^4.1.18",
|
|
@@ -238,6 +238,31 @@
|
|
|
238
238
|
},
|
|
239
239
|
"overrides": {
|
|
240
240
|
"js-beautify": "https://codeload.github.com/ignatremizov/js-beautify/tar.gz/e5bacd263883f5297e4fa2aaeb2186a3f5905299",
|
|
241
|
-
"
|
|
241
|
+
"@actions/http-client": {
|
|
242
|
+
"undici": "6.24.1"
|
|
243
|
+
},
|
|
244
|
+
"@semantic-release/npm": {
|
|
245
|
+
"npm": "11.12.1"
|
|
246
|
+
},
|
|
247
|
+
"@semantic-release/github": {
|
|
248
|
+
"undici": "7.24.6"
|
|
249
|
+
},
|
|
250
|
+
"npm": {
|
|
251
|
+
"brace-expansion": "5.0.5",
|
|
252
|
+
"picomatch": "4.0.4"
|
|
253
|
+
},
|
|
254
|
+
"flatted": "3.4.2",
|
|
255
|
+
"handlebars": "4.7.9",
|
|
256
|
+
"jsdom": {
|
|
257
|
+
"undici": "7.24.6"
|
|
258
|
+
},
|
|
259
|
+
"brace-expansion": "5.0.5",
|
|
260
|
+
"minimatch": "10.2.4",
|
|
261
|
+
"picomatch": "4.0.4",
|
|
262
|
+
"rollup": "4.60.1",
|
|
263
|
+
"tinyglobby": {
|
|
264
|
+
"picomatch": "4.0.4"
|
|
265
|
+
},
|
|
266
|
+
"yaml": "2.8.3"
|
|
242
267
|
}
|
|
243
268
|
}
|