Skip to content

Commit 55ba9fd

Browse files
authored
Merge pull request #1201 from fortunatomaldonado/AUI-3222
fix(alloy-ui): AUI-3222 Avoid calling selectionChange on invaild dates
2 parents e2b54af + c19dcf1 commit 55ba9fd

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

third-party/projects/alloy-ui/src/aui-datepicker/js/aui-datepicker-native.js

+6-4
Original file line numberDiff line numberDiff line change
@@ -232,10 +232,12 @@ DatePickerNativeBase.prototype = {
232232
parsed = instance._parseDateFromString(activeInput.val());
233233
}
234234

235-
instance.fire(
236-
'selectionChange', {
237-
newSelection: parsed ? [parsed] : []
238-
});
235+
if (parsed) {
236+
instance.fire(
237+
'selectionChange', {
238+
newSelection: [parsed]
239+
});
240+
}
239241
},
240242

241243
/**

0 commit comments

Comments
 (0)