Skip to content

Commit 1d5bd1d

Browse files
committed
Fixes a problem with the datepicker widget.
The property linked using the "value" option was not updated following the selection of a date using the calendar. Now the "change" event is fired on the datepicker's "onSelect" event and this fixes the problem. See http://stackoverflow.com/questions/6471959/jquery-datepicker-onchange-event-help
1 parent ae77ebc commit 1d5bd1d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

addon/mixins/jqui-widget.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import Ember from 'ember';
2+
import $ from 'jquery';
23

34
// Create a new mixin for jQuery UI widgets using the Ember
45
// mixin syntax.
@@ -21,7 +22,11 @@ export default Ember.Mixin.create({
2122
var ui;
2223
var uiType = _this.get('uiType');
2324
if (uiType === "datepicker") {
24-
_this.$().datepicker(options);
25+
_this.$().datepicker(
26+
$.extend(options, {
27+
onSelect: function() { _this.$().change(); }
28+
})
29+
);
2530
ui = _this.$(uiType)['widget'];
2631
} else {
2732

0 commit comments

Comments
 (0)