🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@mypandora/element-datepicker

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mypandora/element-datepicker

### 依赖

latest
Source
npmnpm
Version
0.0.7
Version published
Weekly downloads
8
-46.67%
Maintainers
2
Weekly downloads
 
Created
Source

日期选择器

依赖

Vue 2.6.14+

Element-UI 2.15.8+

安装

npm install @mypandora/element-datepicker

属性、事件、方法

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

扩展之处

  • 支持半年度选择

  • 支持季度选择

  • 支持旬选择

日期格式

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

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

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

格式含义备注举例
yyyy2017
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不补01
MM01
W仅周选择器的 format 可用;不补01
WW仅周选择器的 format 可用01
d不补02
dd02
H小时24小时制;不补03
HH小时24小时制03
h小时12小时制,须和 Aa 使用;不补03
hh小时12小时制,须和 Aa 使用03
m分钟不补04
mm分钟04
s不补05
ss05
AAM/PMformat 可用,大写AM
aam/pmformat 可用,小写am
timestampJS时间戳value-format 可用;组件绑定值为number类型1483326245000
[MM]不需要格式化字符使用方括号标识不需要格式化的字符 (如 [A] [MM])MM

:::

Attributes

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

FAQs

Package last updated on 09 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts