npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

xx-date-picker

v1.0.0

Published

A beautiful date picker component for uni-app with Chinese and English support

Readme

uni-date-picker

一个美观的 uni-app 日期选择器组件,支持中英文切换。

特性

  • 📅 美观的日历界面
  • 🌐 支持中文和英文
  • 📱 适配 uni-app 多端(H5、小程序、App)
  • 🎨 现代化的 UI 设计
  • ⚡ 轻量级,基于 dayjs
  • 🔧 易于使用和自定义

安装

npm install uni-date-picker

使用方法

1. 在页面中引入组件

<template>
  <view>
    <date-picker 
      v-model="selectedDate" 
      placeholder="请选择日期"
      lang="zh"
      @change="onDateChange"
    ></date-picker>
  </view>
</template>

<script>
import DatePicker from 'uni-date-picker'

export default {
  components: {
    DatePicker
  },
  data() {
    return {
      selectedDate: ''
    }
  },
  methods: {
    onDateChange(date) {
      console.log('选中的日期:', date)
    }
  }
}
</script>

2. 全局注册(可选)

main.js 中全局注册:

import Vue from 'vue'
import DatePicker from 'uni-date-picker'

Vue.component('DatePicker', DatePicker)
// 或者使用 Vue.use()
// Vue.use(DatePicker)

API

Props

| 参数 | 说明 | 类型 | 默认值 | 必填 | |------|------|------|--------|------| | value | 当前选中的日期值,格式:YYYY-MM-DD 或 YYYY/MM/DD | String | '' | 否 | | placeholder | 输入框占位符 | String | '' | 否 | | disabled | 是否禁用 | Boolean | false | 否 | | lang | 语言设置,'zh' 或 'en' | String | 'zh' | 否 |

Events

| 事件名 | 说明 | 回调参数 | |--------|------|----------| | input | 日期值改变时触发(用于 v-model) | (date: string) | | change | 日期值改变时触发 | (date: string) |

示例

中文模式

<date-picker 
  v-model="date" 
  placeholder="请选择日期"
  lang="zh"
></date-picker>

英文模式

<date-picker 
  v-model="date" 
  placeholder="Select a date"
  lang="en"
></date-picker>

设置默认值

<date-picker 
  v-model="date" 
  placeholder="请选择日期"
></date-picker>

<script>
export default {
  data() {
    return {
      date: '2026-01-04' // 默认日期
    }
  }
}
</script>

禁用状态

<date-picker 
  v-model="date" 
  :disabled="true"
></date-picker>

日期格式

  • 输入/输出格式: YYYY-MM-DD (例如: 2026-01-04)
  • 显示格式: YYYY/MM/DD (例如: 2026/01/04)

依赖

  • dayjs - 轻量级日期处理库

浏览器支持

支持所有 uni-app 支持的平台:

  • H5
  • 微信小程序
  • 支付宝小程序
  • 百度小程序
  • 字节跳动小程序
  • App (iOS/Android)

开发

# 克隆项目
git clone https://github.com/yourusername/uni-date-picker.git

# 进入目录
cd uni-date-picker

# 安装依赖
npm install

许可证

MIT

更新日志

1.0.0

  • 初始版本
  • 支持中英文切换
  • 基础日期选择功能