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

turnero-ember-cli-datepicker

v2.0.1

Published

An Ember datepicker component using Pikaday and momentjs

Downloads

4

Readme

Dependencia 'ember-datepicker' para turnero.cba.gov.ar, transferida a NPM.


#Ember CLI Datepicker Build Status

Description

This component is an Ember CLI add-on and uses moment.js along with pickaday to create an extensible ember component. This is still a work in progress. Pull requests are welcome.

Installation

# install the addon and include it in your project
$ ember install:addon ember-cli-datepicker

Basic Usage

{{date-picker date=mydate valueFormat='YYYY-MM-DD'}}

Demo

Check out the demo on github pages. Alternatively you can clone this repo and run the app

$ sudo npm install -g ember-cli
$ git clone [email protected]:squirelabs/ember-datepicker
$ cd ember-datepicker
# install dependencies
$ npm install; bower install
# fire up local server
$ ember serve

Options

When calling the the datepicker, the following options are available:

General Options

date

Type: String or Date

This variable will be changed when the user changes the date. It will be updated using the valueFormat specified.

valueFormat

Type: String Default: X

This is the format in which the date is passed back to the controller.

This format must be one of the momentjs defined formats, or be set to 'date' to be recognised as a Javascript Date object.

format

Type: String Default: YYYY-MM-DD

This is the format in which the date is displayed in the input box.

yearRange

Type: String or Array Default: -3,4

This range of years to be displayed. It is either in the form of a relative range (the first option goes from the current year back 3 years, and forward 4 years), or it can be defined in absolute terms. The value may also be an array. Here are some examples of valid inputs.

yearRange: "-3,4"
yearRange: [-2,8]
yearRange: [2000,2020]
yearRange: "2010,2016"

numberOfMonths

Type: Number Default: 1

The number of months to display in the datepicker component.

allowBlank

Type: Boolean Default: false

Can be set to allow blank dates (date = null). By default, null values will be replaced by the current date on initial render and every time the datepicker is closed. With this option, date may stay null.

utc

Type: Boolean Default: false

Per default, the created date value will obtain the computer's timezone and therefore not have UTC midnight as its time and will be a few hours off instead.

For example, when your timezone is 8 hours ahead of UTC: Creating a date object from the input "2000-01-01" will result in "1999-12-31T16:00:00.000Z", because when your computer has the time of 00:00:00 on Jan 1st 2000, UTC time is still in 1999. This is technically correct, but may not be what you want.

If you want to have easy-to-compare date strings in your JSON, set utc to true and you will get "2000-01-01T00:00:00.000Z" as expected.