Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

m-datetime-picker

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

m-datetime-picker

m-datetime-picker 日期时间选择器,基于m-picker扩展来

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

m-datetime-picker


日期时间选择器,基于m-picker扩展来

安装

npm i m-datetime-picker --save

何时使用

需要选择日期时间时,代替系统原生的datetime input

用法

基本的用法,默认是日期时间选择器,返回格式为'yyyy-MM-dd HH:mm'

通过设置dateFormat改变日期时间的选择字段及格式;

关键字含义:Y:'年', M:'月', d:'日', H:'时', m:'分', s:'秒'

通过设置minDatemaxDate限定日期选择的范围;

通过设置defaultValue改变初始值,注意,如果初始值不在限定日期内,则会失效。

API

属性基本继承自Picker组件

成员说明类型默认值
onOpen弹层打开时Functionnoop
onClose弹层关闭时Functionnoop
defaultValue默认时间,是一个时间戳number+new Date()
dateFormat日期时间的格式{Y:'年', M:'月', d:'日', H:'时', m:'分', s:'秒'}string'Y-M-d H:m'
minDate限定起始日期,xxxx-xx-xx格式(或者要求作为new Date的参数能够返回正确的值)string'1970-01-01'
maxDate限定终止日期,同上string'2040-12-31'
toolbar是否显示弹层的标题栏booleantrue
toolbarTitle弹层标题栏的内容string'请选择'
showSubmitBtn是否显示弹层的确定按钮booleantrue
showClearBtn是否显示弹层的清除按钮booleanfalse

Keywords

FAQs

Package last updated on 23 May 2017

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc