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 🙏

© 2026 – Pkg Stats / Ryan Hefner

simple-momentpicker

v1.0.3

Published

A simple datetime picker component.

Readme

#simple-momentpicker ![Circle CI](https://circleci.com/gh/mycolorway/simple-momentpicker.png?circle-token= a8f56261048d7fd84862e210b7e3b884f4ac4166)

A simple, swift and customizable date/time picker based on simple-module

Designed for both mouse and keyboard intereaction.

Quick start

  1. Download the latest release, or via Bower.

    You should also get these dependencies: jQuery, momentjs and simple-module

  2. Import js/css file to your code

    <link rel="stylesheet" href="path/to/momentpicker.css"/>
    
    <script type="text/javascript" src="path/to/jquery.js"></script>
    <script type="text/javascript" src="path/to/module.js"></script>
    <script type="text/javascript" src="path/to/moment.js"></script>
    <script type="text/javascript" src="path/to/momentpicker.js"></script>
    

    The plugin can also be loaded as AMD or CommonJS module.

  3. Then you can run it like:

     simple.momentpicker({
       el: '#time'
    });
       

Configuration options

| Option | Value | Default | Description | |---------------|------------------------|--------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------| | el | selector/jQuery Obejct | null | a input element to initial momentpicker, necessary | | list | array | ['year','%-',,'month', '%-', 'date', '%,', 'hour', '%:', 'minute'] | set picker's selectable views, only year, month, date, hour, minute is provided, string begins with '%' will be converted to text | | inline | boolean | false | if set true, will append momentpicker after el | | valueFormat | string | 'YYYY-MM-DD HH:mm' | momentjs's format string, set input's value format | | displayFormat | string | 'YYYY-MM-DD HH:mm' | momentjs's format string, set input's display format, only available when inline false | | defaultView | string | 'auto' | default view when momentpicker shows | | class | string | 'datetime-picker' | the class name add to momentpicker dom | | viewOpts | obejct | - | the options passed to views, only date's disableBefore and disableAfter provided | |

To simplify configuration, we provide these method:

  • simple.momentpicker initialize a datetime picker
  • simple.momentpicker.date initialize a date picker
  • simple.momentpicker.month initialize a month picker
  • simple.momtnpicker.time initialize a time picker

Please refer to demo to get more details.

Method and Event

Instance Method

  • setDate()

    set momentpicker's date, could be date string or moment obeject.

  • clear()

    reset momentpicker's date.

  • show()/hide()/toggle()

    controler momentpicker's show/hide.

  • destroy()

    destroy momentpicker, reset all.

Event

  • select

    triggered when selected a date/time, the only argument is a moment object which represents selected date.