ember-cleave

1.2.0 • Public • Published

ember-cleave

The addon is a wrapper on Cleave.js package made with Ember.js

Preview

alt text

Installation

ember install ember-cleave

Usage

Define a options object in your component:

// component.js
dateOptions: computed(function() {
  return {
    date: true,
    datePattern: ['Y', 'm', 'd']
  }
}),

Then in your template:

<Ember-Cleave
  @options={{dateOptions}}
  @placeholder="Custom placeholder"
  @value={{value}}
  @onChange={{action (mut value)}}
/>

Check documentation of Cleave.js to see more usage options

License

This project is licensed under the MIT License.

Package Sidebar

Install

npm i ember-cleave

Weekly Downloads

10

Version

1.2.0

License

MIT

Unpacked Size

39.3 kB

Total Files

8

Last publish

Collaborators

  • rxbsxn