
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
anima-datetimepicker
Advanced tools
轻量级的日期时间选择组件,基于 anima-scroller 、 anima-yocto-touch ,支持Android 4.1+,iOS 6+。
$ spm install anima-datetimepicker --save
var DatetimePicker = require('anima-datetimepicker');
// 使用 trigger
new DatetimePicker({
trigger : '#id',
format : 'YYYY-MM-DD'
});
// 定制输入和输出
var picker = new DatetimePicker({
format : 'YYYY-MM-DD HH:II',
onConfirm : function(value) {
console.log(value);
}
});
picker.show('2015-01-01 01:01');
String|Element
唤出控件的元素,可以是CSS3选择器或DOM元素。
String|Element
初始值用 output 的值,完成后自动填充到 output 。
String
设置模板,覆盖的时候不要缺少 data-role
,默认模板请查看源码。
String
日期时间格式,用于输入和输出,支持以下格式的组合。
String
默认日期时间字符串,必须和 format 匹配。
Number
界面里没有年份时使用,默认值为当前年份。
Number
界面里没有月份时使用,默认值为当前月份。
Number
最小年份,默认值为 2000 。
Number
最大年份,默认值为 2030 。
String
年份行模板,默认值为 {value}年
。
String
月份行模板,默认值为 {value}月
。
String
天数行模板,默认值为 {value}日
。
String
小时行模板,默认值为 {value}点
。
String
分钟行模板,默认值为 {value}分
。
Function
选中后执行的回调函数,type表示选中的列,总共有五种类型(year、month、day、hour、minute),value为选中的值。
new DatetimePicker({
onSelect : function(type, value) {
console.log(type, value);
}
});
Function
完成后执行的回调函数, value 会按 format 格式化。
Function
显示后时执行的回调函数。
Function
隐藏后执行的回调函数。
显示控件。value为日期时间字符串,必须和 format 匹配。
隐藏控件。
销毁控件,从DOM中移除。
查找组件内的DOM元素。
返回当前选中的日期时间字符串。
隐藏控件,触发 onConfirm 事件。
选中一个列,type表示选中的列,总共有五种类型(year、month、day、hour、minute),value为选中的值。
FAQs
The npm package anima-datetimepicker receives a total of 1 weekly downloads. As such, anima-datetimepicker popularity was classified as not popular.
We found that anima-datetimepicker demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
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.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.