Skip to content

Commit c19dcf1

Browse files
fix(alloy-ui): AUI-3222 Avoid calling selectionChange when parsed date is not valid
1 parent e2b54af commit c19dcf1

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)