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

time-date-picker

v1.0.7

Published

a mobile date picker

Downloads

11

Readme

time-date-picker

这是一个使用原生js编写的移动端防ios的时间选择器. 插件的安装方式:

npm install date-time-picker

插件的引入方式:

(1) 直接引入: 通过在页面中创建script标签即可.

(2) AMD 方式引入:

在需要使用该插件的地方定义:

var DatePicker = require('time-date-picker');

(3) CMD方式引入:

在需要使用该插件的地方定义:

import DatePicker from 'time-date-picker';

具体使用方法,绑定相应dom结构,然后实例化该插件的方法,示例代码如下:

new DatePicker({
    dateBtn:'datetime-select-datebtn',  //必选项, 触发时间弹窗的元素,可以是任何元素
    container: 'datetimeContainer',   //必选项, 存放时间弹窗的容器
    type: 5,  //可选项,我是用来配置年月日 or 时分 or 年月日时分的,他们分别是0,1,2
    startTime: new Date(),  //可选项
    startYear: 2018,        // 可选项, 开始的年份,默认1990
    endYear: 2018,          // 可选项, 结束的年份,默认当年
    param: [1,1,1,1,1], //可选项, type确定的话,param也会跟着确定,如果想要定义年月日 or 时分 or 年月日时分 这三个类型之外的选择器,则不设置type,通过数组配置即可.
    success: function (result) { //可选项, result就是选择的最终结果, 我们可以在成功后的回调函数里设置绑定的值=result
        bindVariable = result;
    }
})

注意 在使用这个插件的时候如果遇到样式错乱的问题,需要在全局设置样式,具体原因我还不是很清楚,可能样式是因为被某个地方设置的样式覆盖导致.  

  • { margin: 0;padding:0; }

如果觉得这个插件对你有所帮助,欢迎star~ 如果你在使用的过程中遇到任何疑问,可以随时联系我奥~