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

mob-date-selector

v1.3.0

Published

a flexible picker for selecting an interval

Downloads

154

Readme

Intro

  • User-defined units. You can set year and month or month, date, hour and minute.
  • User-defined time ranges. You can set anytime with the precision of a minute
  • For example, you can set begin time at Dec -27(th), 2011 102:12 and end time at Oct 21(st), 2020 20:20

1. How to use

npm i mob-date-selector --save-dev

2. How to import

webpack.config.js:

var path = require('path');
module.exports = {
entry : {...},
output : {...},
module : {
	loaders :[{
		test: /\.css$/,
		loader: 'style!css'
	}, {
		test: /\.js$/,
		exclude: path.resolve('./node_modules'),
		loader: 'babel',
	}]
}
}

html:

<body>
	<!-- the #date-selector-input can be any other dom for your convenient-->
	<input id="date-selector-input" type="text" readonly/>
	<!-- the #targetContainer must be the outermost dom below body -->
	<div id="targetContainer"></div>
</body>

js:

import DateSelector from 'mob-date-selector';
new DateSelector({ ... });

Parameter List:

| Attributes | Type | Value | Details | | -----| -----| -----| -----| | input | {String} |eg:'date-selector-input' | the id of the dom you touch. | | container | {String} |eg:'targetContainers'| the id of the container you ready to append dom. | | type | {Number} |0 OR 1 | 0:free style without tab; 1: fixed style with tab. | | param | {Array} |eg:[0, 1, 1, 1, 1]| user-defined units, every position means ['year', 'month', 'day', 'hour', 'minute']. 1 means you need the unit,0 means you dont need it. There must be serial 1.| | beginTime | {Array} |eg:[3,27,12,12] Mar 27(th) 12:12 default : [1970, 1, 1, 0, 0]| user-defined begin time points. An empty array means default array. The equivalent of every position is the sequent position of 1 in param. | | endTime | {Array} |the same to beginTime default : [nextYear, 12, 31, 23, 59]| user-defined end time points. An empty array means default array. The equivalent of every position is the sequent position of 1 in param. | | recentTime | {Array} |the same to beginTime| user-defined recent time points. An empty array means NOW. The equivalent of every position is the sequent position of 1 in param. | | success | {function} |function(arr){alert(arr)}| function(arr){} User-defined callback. The first param is the result. |

3. Tips

  • For questions and issues please use THIS WAY
  • You must instantiate it after ready.
  • I am Appian.