ember-daypicker

0.7.0 • Public • Published

npm version CircleCI Ember Observer Score

ember-daypicker

ember-daypicker is a simple datepicker component for ember.js. It's built using moment.js; there are no external datepicker libraries. There's basic keyboard support, too.

Here's an introduction to it (with examples).

  • Ember.js v2.18 or above
  • Ember CLI v2.13 or above

ember install ember-daypicker

Usage

You get a component en-daypicker-input that be used as such:

  {{en-daypicker-input
    date=date
    on-select=(action 'didSelectDate')
  }}

It uses moment.js everywhere, so you should pass in a moment object as the date attr, and when you handle the on-select action, you should also expect a moment object to be sent back to you.

Optionally, you can also provide the format attribute that will control how the selected date gets shown in the input field. By default, it is MMM D which would be something like Mar 10.

You can disable dates before or after a certain date by passing in the minDate or the maxDate attributes.

Last, you can provide the placeholder attribute to change the placeholder text that the datepicker input displays. You can also use the isFocused attribute to decide whether the datepicker is shown by default or not.

Questions? Bugs?

Feel free to create an issue or send a PR if you find a bug.

Package Sidebar

Install

npm i ember-daypicker

Weekly Downloads

2

Version

0.7.0

License

MIT

Unpacked Size

30.1 kB

Total Files

33

Last publish

Collaborators

  • swastik