ember-cli-input-helpers

    1.2.2 • Public • Published

    ember-cli-input-helpers

    Helper functions for binding HTML input elements to properties.

    Install

    ember install ember-cli-input-helpers
    

    Features

    • Computed properties for transforming input strings to JavaScript objects
    • Works well with Ember.Data

    Usage

    Date

    Use the date computed property to convert the date input string to/from a JavaScript Date object.

    import { date as dateInput } from 'ember-cli-input-helpers/computed';
    
    const Person = DS.Model ({
      // The birthday as a date type.
      birthday: DS.attr ('date'),
      
      // Property specifically for inputs.
      birthdayInput: dateInput ('birthday')
    });

    Then use the birthdayInput property in the {{input}} helper, and not birthday property.

    {{input value=model.birthdayInput}}

    Install

    npm i ember-cli-input-helpers

    DownloadsWeekly Downloads

    4

    Version

    1.2.2

    License

    Apache-2.0

    Unpacked Size

    38.7 kB

    Total Files

    20

    Last publish

    Collaborators

    • onehilltech