Skip to content

Commit

Permalink
Support dates for enable_and_clear behaviour #231
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisala committed Feb 20, 2024
1 parent f52c135 commit 91ec0f7
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions grails-app/assets/javascripts/forms-knockout-bindings.js
Original file line number Diff line number Diff line change
Expand Up @@ -1051,9 +1051,12 @@
element.removeAttribute("disabled");
else if ((!value) && (!element.disabled)) {
element.disabled = true;
var value = allBindings.get('value');
if (ko.isObservable(value)) {
value(undefined);
var possibleValueBindings = ['value', 'datepicker'];
for (var i=0; i<possibleValueBindings.length; i++) {
var value = allBindings.get(possibleValueBindings[i]);
if (ko.isObservable(value)) {
value(undefined);
}
}
}

Expand Down

0 comments on commit 91ec0f7

Please sign in to comment.