Skip to content
An aurelia flatpickr custom element
JavaScript HTML
Branch: master
Clone or download
Pull request Compare This branch is 17 commits ahead, 1 commit behind aurelia:master.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
build
dist
doc
src
test
.editorconfig
.eslintrc.json
.gitignore
.npmignore
CONTRIBUTING.md
ISSUE_TEMPLATE.md
LICENSE
README.md
config.js
gulpfile.js
karma.conf.js
package.json

README.md

aurelia-flatpickr

This is an aurelia flatpickr plugin. Use as a custom element.

Getting Started

Install from npm:

  npm install aurelia-flatpickr

In your application entry file:

  export async function configure(aurelia) {
    aurelia.use
        .plugin(PLATFORM.moduleName('aurelia-flatpickr'))
        ...
  }

Then use as a custom element anywhere throughout your application:

  <aurelia-flatpickr config.bind="config" value.bind="value"></aurelia-flatpickr>

Using Custom Input Groups

The default template for the input element can be replaced to customise the buttons available. Here's an example:

<aurelia-flatpickr config.bind="{wrap:true}">
  <div class="input-group aurelia-flatpickr">
      <input type="text" class="form-control" placeholder="Select date" data-input>
      <span class="input-group-btn">
          <button class="btn btn-default" type="button" data-clear>Clear</button>
          <button class="btn btn-default" type="button" data-toggle>Show</button>
      </span>
  </div>
</aurelia-flatpickr>

Running The Tests

To run the unit tests, first ensure that you have followed the steps above in order to install all dependencies and successfully build the library. Once you have done that, proceed with these additional steps:

  1. Ensure that the Karma CLI is installed. If you need to install it, use the following command:
npm install -g karma-cli
  1. Ensure that jspm is installed. If you need to install it, use the following commnand:
npm install -g jspm
  1. Install the client-side dependencies with jspm:
jspm install
  1. You can now run the tests with this command:
karma start
You can’t perform that action at this time.