adopted-ember-addons / ember-pikaday

A datepicker component for Ember CLI projects.
MIT License
159 stars 169 forks source link

Update for Ember 4 and Embroider #532

Closed ef4 closed 2 years ago

ef4 commented 2 years ago

This is rewrite into modern Ember patterns, and repackaging as a v2 formatted addon. There are semver major changes:

The <PikadayInput> and <PikadayInputless/> components should have no changes (and all their tests are passing unchanged).

There is also now a modifier to directly invoke Pikaday on an element:

<input {{pikaday value=this.startDate onSelect=this.setStartDate}} />

CSS Handling

None of these components hard-code their CSS, because this addon historically has an option to leave the CSS out. Instead, consuming apps that want the standard CSS should pull it in. For example:

// app/modifiers/pikaday.js
import "ember-pikaday/pikaday.css";
export { default } from "ember-pikaday/modifiers/pikaday";
ef4 commented 2 years ago

This PR includes a GitHub Actions setup, you can see it running here: https://github.com/ef4/ember-pikaday/pull/1