Skip to content
This repository was archived by the owner on Dec 26, 2019. It is now read-only.

Commit 627a6aa

Browse files
committed
Fix bug when the input field can't access value
1 parent ae712de commit 627a6aa

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

addon/components/bootstrap-datepicker.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ export default Ember.Component.extend({
55

66
setupBootstrapDatepicker: function() {
77
var self = this,
8-
element = this.$();
8+
element = this.$(),
9+
value = this.get('value');
910

1011
element.
1112
datepicker({
@@ -22,7 +23,7 @@ export default Ember.Component.extend({
2223
});
2324

2425
if (value) {
25-
element.datepicker('setDate', new Date(this.get('value')));
26+
element.datepicker('setDate', new Date(value));
2627
};
2728
}.on('didInsertElement'),
2829

0 commit comments

Comments
 (0)