Skip to content

Instantly share code, notes, and snippets.

@wmadden
Last active April 26, 2017 08:55
Show Gist options
  • Save wmadden/c1c420acd3cb4c914199a4b5a1daa155 to your computer and use it in GitHub Desktop.
Save wmadden/c1c420acd3cb4c914199a4b5a1daa155 to your computer and use it in GitHub Desktop.
ember-flatpickr attributeBindings bug
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
onFlatpickrChange(dates) {
this.set('flatpickrValue', dates);
},
flatpickrValue: new Date(),
});
<h1>ember-flatpickr attributeBindings bug</h1>
<br>
Initial date value is formatted correctly by flatpickr.
<br>
Choose a new date.
<br>
ember-flatpickr will override the formatted string flatpickr creates.
<br>
{{ember-flatpickr
allowInput=true
dateFormat="Y-m-d"
onChange=(action onFlatpickrChange)
value=(readonly flatpickrValue)
}}
{
"version": "0.12.1",
"EmberENV": {
"FEATURES": {}
},
"options": {
"use_pods": false,
"enable-testing": false
},
"dependencies": {
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js",
"ember": "2.12.0",
"ember-template-compiler": "2.12.0",
"ember-testing": "2.12.0"
},
"addons": {
"ember-data": "2.12.1",
"ember-flatpickr": "1.1.7"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment