ember-cli-date-textbox

npm version downloads Code Climate

ember-observer-badge

A textbox that will guess the date you want and assign it to your model or query-params.

Compatibility

Installation

The following will install this add-on:

ember install ember-cli-date-textbox

yarn add -D ember-auto-import webpack

Dependencies

The following dependencies are used with this addon and may collide with dependencies in your app/addon:

Demo

The demonstration web application can be found here: http://ember-cli-date-textbox.cybertooth.io/.

Usage

As mentioned above there are several examples on the demonstration site: http://ember-cli-date-textbox.cybertooth.io/

What Does This Add-on Do?

This add-on supplies the following components:

Further information about these items can be found in the Usage section below and in the demo (dummy) application.

Some Bootstrap Love…

If the supplied value can’t be parsed to a date, we add the has-error style class to the .form-group that the {{input-date}} and/or {{input-iso8601}} belongs to. This visualizes that the date parse was rejected.

Components

{{input-date}}

This component makes a textbox. It takes in user input in the form of a date that is swiftly parsed and formatted. The parsed date object is assigned to the component’s date property.

Arguments

Examples





<div class='form-group'>
  <label for='js-updated-on' class='control-label'>Updated</label>
  
  <p class='help-block'>Use with bootstrap!</p>
</div>

(Check out the demo…)

{{input-iso8601}}

What’s iso8601? Go read: https://en.wikipedia.org/wiki/ISO_8601

Just like {{input-date}}, {{input-iso8601}} also makes a simple textbox. It takes in user input in the form of a date that is swiftly parsed and formatted.

Arguments

Examples



<div class='form-group'>
  <label for='js-from' class='control-label'>Date From</label>
  
  <p class='help-block'>Use with bootstrap!</p>
</div>

(Check out the demo…)

Contributing

See the Contributing guide for details.

License

This project is licensed under the MIT License.