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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@mypandora/element-datepicker

v0.0.7

Published

### 依赖

Downloads

4

Readme

日期选择器

依赖

Vue 2.6.14+

Element-UI 2.15.8+

安装

npm install @mypandora/element-datepicker

属性、事件、方法

兼容 element-ui datepicker 的所有属性、事件、方法

扩展之处

  1. 支持半年度选择

  2. 支持季度选择

  3. 支持旬选择

日期格式

使用format指定输入框的格式;使用value-format指定绑定值的格式。

默认情况下,组件接受并返回Date对象。以下为可用的格式化字符串,以 UTC 2017年1月2日 03:04:05 为例:

:::warning 请注意大小写 :::

| 格式 | 含义 | 备注 | 举例 | |------|------|------|------| | yyyy | 年 | | 2017 | | BB | 半年 | 仅半年选择器的 value-format 可用;使用 01, 02 表示| 201701| | B | 半年 | 仅半年选择器的 format 可用,使用上半年、下半年表示 | 2017上半年| | QQ | 季度 | 仅季度选择器的 value-format 可用;使用 01, 02, 03, 04 表示| 201701| | Q | 季度 | 仅季度选择器的 format 可用,使用第一季度、第二季度、第三季度、第四季度表示 | 2017第一季度| | TT | 旬 | 仅旬选择器的 value-format 可用;使用 01, 02, 03 表示| 20170101| | T | 旬 | 仅旬选择器的 format 可用,使用上旬、中旬、下旬表示 | 2017年01月上旬| | M | 月 | 不补0 | 1 | | MM | 月 | | 01 | | W | 周 | 仅周选择器的 format 可用;不补0 | 1 | | WW | 周 | 仅周选择器的 format 可用 | 01 | | d | 日 | 不补0 | 2 | | dd | 日 | | 02 | | H | 小时 | 24小时制;不补0 | 3 | | HH | 小时 | 24小时制 | 03 | | h | 小时 | 12小时制,须和 Aa 使用;不补0 | 3 | | hh | 小时 | 12小时制,须和 Aa 使用 | 03 | | m | 分钟 | 不补0 | 4 | | mm | 分钟 | | 04 | | s | 秒 | 不补0 | 5 | | ss | 秒 | | 05 | | A | AM/PM | 仅 format 可用,大写 | AM | | a | am/pm | 仅 format 可用,小写 | am | | timestamp | JS时间戳 | 仅 value-format 可用;组件绑定值为number类型 | 1483326245000 | | [MM] | 不需要格式化字符 | 使用方括号标识不需要格式化的字符 (如 [A] [MM]) | MM |

:::

Attributes

| 参数 | 说明 | 类型 | 可选值 | 默认值 | |---------- |-------------- |---------- |-------------------------------- |-------- | | type | 显示类型 | string | year/halfyear/quarter/month/tenday/date/dates/tendays/months/quarters/halfyears/years week/datetime/datetimerange/ daterange/monthrange | date |