vue-datepicker-skill

vue-datepicker-skill is a skill for Claude Code, Codex from jiushiwon/wg-skills. It costs 40 tokens per session (4,358 once invoked), scanned A, original, Apache-2.0.

A Vue 3 date-picker component for choosing dates, date ranges, months, or years. It also supports formatted output, shortcuts, clearing, and rules that disable selected dates.

In plain words
What is it for?
Use it in forms, search filters, reports, booking screens, and other Vue pages that need a date or date-range field.
Why use it?
It avoids implementing calendar navigation, range selection, date formatting, and disabled-date handling from scratch. The same component can cover several common date input needs.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it in forms, search filters, reports, booking screens, and other Vue pages that need a date or date-range field.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jiushiwon/wg-skills/vue-datepicker-skill
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add jiushiwon/wg-skills --skill vue-datepicker-skill
Clone the repo
git clone --depth 1 https://github.com/jiushiwon/wg-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for vue-datepicker-skill

README.md
[![agentmods](https://agentmods.dev/badge/skills/jiushiwon/wg-skills/vue-datepicker-skill/github.svg)](https://agentmods.dev/skills/jiushiwon/wg-skills/vue-datepicker-skill)
Your own site
<a href="https://agentmods.dev/skills/jiushiwon/wg-skills/vue-datepicker-skill"><img src="https://agentmods.dev/badge/skills/jiushiwon/wg-skills/vue-datepicker-skill/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for vue-datepicker-skill

Your own site · 80×15
<a href="https://agentmods.dev/skills/jiushiwon/wg-skills/vue-datepicker-skill"><img src="https://agentmods.dev/badge/skills/jiushiwon/wg-skills/vue-datepicker-skill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,358 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00040 $0.04358
Opus 5.5 $0.00016 $0.01743
Sonnet 5.5 $0.00008 $0.00872
Haiku 4.5 $0.00004 $0.00436

Measured 2mo ago against content hash 1fbe98795b18, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

vue-datepicker-skill scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

The scan reads SKILL.md. This mod also ships 3 executable files (components/index.ts, composables/useDatePicker.ts, types/datepicker.ts), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

frontend/vue/vue-base-skill/vue-datepicker-skill/SKILL.md · 624 lines

How it starts

The opening of the file, as written. The whole thing — 624 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Vue DatePicker Skill

容器原则:必须嵌入 <base-card> 使用
零 HTML5 标签:使用 <span role="button"> 实现导航按钮

日期选择器组件,详细规范见 base-datepicker.md

功能特性

  • ✅ 日期选择
  • ✅ 范围选择
  • ✅ 年/月选择
  • ✅ 快捷选择(今天、昨天、近7天等)
  • ✅ 禁用日期
  • ✅ 格式化输出

使用方式

<script setup lang="ts">
import { ref } from 'vue';
import { BaseDatePicker } from './components/BaseDatePicker';

const date = ref('');
</script>

<template>
  <BaseDatePicker v-model="date" placeholder="选择日期" />
</template>

Props

参数 类型 默认值 说明
modelValue string - 绑定值
type 'date' | 'daterange' | 'month' | 'year' 'date' 类型
placeholder string '请选择日期' 占位符
disabled boolean false 是否禁用
disabledDate (date: Date) => boolean - 禁用日期函数
format string 'YYYY-MM-DD' 输出格式
shortcuts Shortcut[] - 快捷选项
clearable boolean true 是否可清空

TypeScript 类型

types/datepicker.ts

// 日期选择器类型

export interface Shortcut {
  text: string;
  value: () => [Date, Date] | Date;
}

export interface DatePickerProps {
  modelValue?: string;
  type?: 'date' | 'daterange' | 'month' | 'year';
  placeholder?: string;
  disabled?: boolean;
  disabledDate?: (date: Date) => boolean;
  format?: string;
  shortcuts?: Shortcut[];
  clearable?: boolean;
}

export interface DatePickerEmits {
  'update:modelValue': [value: string];
  change: [value: string];
}

组件代码

BaseDatePicker.vue

<script setup lang="ts">
import { ref, computed, watch } from 'vue';
import type { DatePickerProps, DatePickerEmits, Shortcut } from './types/datepicker';
import './styles.css';

const props = withDefaults(defineProps<DatePickerProps>(), {
  type: 'date',
  placeholder: '请选择日期',
  disabled: false,
  format: 'YYYY-MM-DD',
  clearable: true,
  shortcuts: () => [],
});

const emit = defineEmits<DatePickerEmits>();

const visible = ref(false);
const currentMonth = ref(new Date());
const selectedDate = ref<Date | null>(null);
const selectedRange = ref<[Date | null, Date | null]>([null, null]);
const hoverDate = ref<Date | null>(null);

// 生成日历数据
const calendarDays = computed(() => {
  const year = currentMonth.value.getFullYear();
  const month = currentMonth.value.getMonth();
  
  const firstDay = new Date(year, month, 1);
  const lastDay = new Date(year, month + 1, 0);
  
  const days: Date[] = [];
  
  // 填充上月天数
  const firstWeekDay = firstDay.getDay();
  for (let i = firstWeekDay - 1; i >= 0; i--) {
    const d = new Date(year, month, -i);
    days.push(d);
  }
  
  // 当月天数
  for (let i = 1; i <= lastDay.getDate(); i++) {
    days.push(new Date(year, month, i));
  }
  
  // 填充下月天数
  const remaining = 42 - days.length;
  for (let i = 1; i <= remaining; i++) {
    days.push(new Date(year, month + 1, i));
  }
  
  return days;
});

const weekDays = ['日', '一', '二', '三', '四', '五', '六'];

const monthText = computed(() => {
  return `${currentMonth.value.getFullYear()}年${currentMonth.value.getMonth() + 1}月`;
});

const displayValue = computed(() => {
  if (props.type === 'daterange') {
    if (!selectedRange.value[0]) return '';
    if (!selectedRange.value[1]) return '开始日期 - 结束日期';
    return `${formatDate(selectedRange.value[0])} - ${formatDate(selectedRange.value[1])}`;
  }
  if (!selectedDate.value) return '';
  return formatDate(selectedDate.value);
});

function formatDate(date: Date): string {
  const y = date.getFullYear();
  const m = String(date.getMonth() + 1).padStart(2, '0');
  const d = String(date.getDate()).padStart(2, '0');
  return `${y}-${m}-${d}`;
}

function isSameDay(d1: Date, d2: Date): boolean {
  return d1.getFullYear() === d2.getFullYear() && 
         d1.getMonth() === d2.getMonth() && 
         d1.getDate() === d2.getDate();
}

function isInRange(date: Date): boolean {
  if (props.type !== 'daterange') return false;
  if (!selectedRange.value[0] || !selectedRange.value[1]) return false;
  
  const time = date.getTime();
  return time >= selectedRange.value[0].getTime() && time <= selectedRange.value[1].getTime();
}

function isStartOrEnd(date: Date): boolean {
  if (props.type !== 'daterange') return isSameDay(date, selectedDate.value!);
  if (!selectedRange.value[0] || !selectedRange.value[1]) return false;
  return isSameDay(date, selectedRange.value[0]) || isSameDay(date, selectedRange.value[1]);
}

function selectDate(date: Date) {
  if (props.disabled) return;
  if (props.disabledDate?.(date)) return;
  
  if (props.type === 'daterange') {
    if (!selectedRange.value[0] || selectedRange.value[1]) {
      selectedRange.value = [date, null];
    } else if (date < selectedRange.value[0]) {
      selectedRange.value = [date, selectedRange.value[0]];
    } else {
      selectedRange.value = [selectedRange.value[0], date];
      visible.value = false;
      const value = `${formatDate(selectedRange.value[0])} - ${formatDate(selectedRange.value[1])}`;
      emit('update:modelValue', value);
      emit('change', value);
    }
  } else {
    selectedDate.value = date;
    visible.value = false;
    const value = formatDate(date);
    emit('update:modelValue', value);
    emit('change', value);
  }
}

function prevMonth() {
  currentMonth.value = new Date(currentMonth.value.getFullYear(), currentMonth.value.getMonth() - 1);
}

function nextMonth() {
  currentMonth.value = new Date(currentMonth.value.getFullYear(), currentMonth.value.getMonth() + 1);
}

function selectShortcut(shortcut: Shortcut) {
  const result = shortcut.value();
  if (Array.isArray(result)) {
    selectedRange.value = result;
    const value = `${formatDate(result[0])} - ${formatDate(result[1])}`;
    emit('update:modelValue', value);
    emit('change', value);
    visible.value = false;
  } else {
    selectedDate.value = result;
    const value = formatDate(result);
    emit('update:modelValue', value);
    emit('change', value);
    visible.value = false;
  }
}

function clear() {
  selectedDate.value = null;
  selectedRange.value = [null, null];
  emit('update:modelValue', '');
  emit('change', '');
  visible.value = false;
}

// 快捷选项
const defaultShortcuts = [
  { text: '今天', value: () => new Date() },
  { text: '昨天', value: () => new Date(Date.now() - 86400000) },
  { text: '近7天', value: () => [new Date(Date.now() - 6 * 86400000), new Date()] },
  { text: '近30天', value: () => [new Date(Date.now() - 29 * 86400000), new Date()] },
];

const shortcuts = computed(() => props.shortcuts.length ? props.shortcuts : defaultShortcuts);
</script>

<template>
  <div class="base-datepicker" :class="{ 'is-disabled': disabled, 'is-opened': visible }">
    <div class="base-datepicker__trigger" @click="visible = !visible">
      <span v-if="!displayValue" class="base-datepicker__placeholder">{{ placeholder }}</span>
      <span v-else class="base-datepicker__value">{{ displayValue }}</span>
      <span class="base-datepicker__icon">
        <span v-if="clearable && displayValue" class="base-datepicker__clear" @click.stop="clear">x</span>
        <span v-else>date</span>
      </span>
    </div>

    <Transition name="fade">
      <div v-if="visible" class="base-datepicker__dropdown">
        <!-- 快捷选项 -->
        <div v-if="shortcuts.length" class="base-datepicker__shortcuts">
          <span
            v-for="shortcut in shortcuts"
            :key="shortcut.text"
            class="base-datepicker__shortcut"
            @click="selectShortcut(shortcut)"
          >
            {{ shortcut.text }}
          </span>
        </div>

        <!-- 头部 -->
        <div class="base-datepicker__header">
          <span class="base-datepicker__nav" role="button" tabindex="0" @click="prevMonth" @keydown.enter="prevMonth">&lt;</span>
          <span class="base-datepicker__current">{{ monthText }}</span>
          <span class="base-datepicker__nav" role="button" tabindex="0" @click="nextMonth" @keydown.enter="nextMonth">&gt;</span>
        </div>

        <!-- 星期 -->
        <div class="base-datepicker__week">
          <span v-for="day in weekDays" :key="day">{{ day }}</span>
        </div>

        <!-- 日历 -->
        <div class="base-datepicker__days">
          <div
            v-for="date in calendarDays"
            :key="date.toISOString()"
            class="base-datepicker__day"
            :class="{
              'is-other-month': date.getMonth() !== currentMonth.getMonth(),
              'is-today': isSameDay(date, new Date()),
              'is-selected': isStartOrEnd(date),
              'is-in-range': isInRange(date),
              'is-disabled': disabledDate?.(date)
            }"
            @click="selectDate(date)"
            @mouseenter="hoverDate = date"
          >
            {{ date.getDate() }}
          </div>
        </div>
      </div>
    </Transition>
  </div>
</template>

Read the full file on GitHub · 624 lines

Files

What ships with it

8 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 624 lines · 40 tokens per session scan A 1fbe98795b18

Subscribe to this mod's changes

vue-datepicker-skill is a skill published in the GitHub repository jiushiwon/wg-skills (154 stars, last pushed 7d ago), licensed Apache-2.0. It adds 40 tokens to every session and 4,358 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-15.

Related

vue-datepicker-skill compared with skills from other repositories

vue-datepicker-skill next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
vue-datepicker-skilljiushiwon/wg-skillsSkill1547d agoApache-2.0A40Claude Code, Codex
shadcn-sveltevercel-labs/json-renderSkill20k7d agoApache-2.0A63Claude Code, Codex
add-localizationmicrosoft/power-platform-skillsSkill1.2ktodayMITA69Claude Code
moai-domain-uiuxmodu-ai/moai-adkSkill1.3ktodayApache-2.0A49Claude Code
moai-domain-frontendmodu-ai/moai-adkSkill1.3ktodayApache-2.0A54Claude Code
vue-router-best-practicesvuejs-ai/skillsSkill3.4k1mo agoMITA25Claude Code, Codex
weapp-vite-vue-sfc-best-practicesweapp-vite/weapp-viteSkill529todayMITA107Codex