Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ember-flatpickr

Package Overview
Dependencies
Maintainers
1
Versions
90
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-flatpickr

An Ember addon that wraps the date picker Flatpickr

  • 0.1.9
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
9.5K
decreased by-8.36%
Maintainers
1
Weekly downloads
 
Created
Source

Ember-flatpickr

npm version npm Ember Observer Score Build Status Code Climate Test Coverage

This is an Ember addon that wraps the date picker Flatpickr. I wanted to use npm instead of bower, so ember-browserify is also required to get this working.

Demo

Guide your users through a tour of your app http://shipshapecode.github.io/ember-flatpickr/

Installation

npm i -D flatpickr ember-browserify

ember install ember-flatpickr

Usage

{{ember-flatpickr
altFormat="Y-m-d"
altInput=true
dateFormat="M/D/Y"
defaultDate=defaultDate
disable=datesToDisable
enableTime=true
hourIncrement=1
inline=false
maxDate=maxDate
minDate=minDate
minuteIncrement=5
noCalendar=false
onChangeAction="doSomeStuffOnChange"
onCloseAction="doSomeStuffOnClose"
parseDate=false
placeholder="Choose a Date"
timeFormat="H:i"
time_24hr=false
value=(mut dateValue)}}

*(All options are displayed, but they have defaults and you only need to pass what you need)

Note: If you want the value to update when you select a date, and onChange fires, you have to use the mut helper.

Whenever a new date is selected, onChange will set the value to the newly selected date. It will also fire the action onChangeAction, and pass the new dateObject to that action.This allows you to pass whatever action you may want in to happen on change.

Observers

maxDate and minDate are watched by observers, and will update the flatpickr instance whenever you change them. This allows you to do things like having two components, used as a range picker, and updating the minDate and maxDate to display valid date choices on each.

Options

All options available to Flatpickr are available here.

Please see the flatpickr docs for a full list of options.

Contributing

If there are features you would like to see implemented, or we have missed some flatpickr options, please open an issue and/or submit a PR!

Keywords

FAQs

Package last updated on 30 Jun 2016

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc