Skip to content

Commit

Permalink
Prevents error in date binding handler when a user clears the date pi…
Browse files Browse the repository at this point in the history
…cker. re #4484
  • Loading branch information
chiatt committed Jun 5, 2019
1 parent 6aa7ec0 commit 50db174
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arches/app/media/js/bindings/datepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ define([
var value = allBindingsAccessor().value;
var picker = $(element).data("DateTimePicker");
if (ko.isObservable(value)) {
if (value() === "") {
if (value() === "" || event.date === false) {
value(null);
}else if (event.date.isValid()) {
value(event.date.format(format));
Expand Down

0 comments on commit 50db174

Please sign in to comment.