Skip to content

Commit

Permalink
Merge pull request #235 from AtlasOfLivingAustralia/feature/issue231
Browse files Browse the repository at this point in the history
Support dates for enable_and_clear behaviour #231
  • Loading branch information
salomon-j authored Feb 20, 2024
2 parents 6406906 + 91ec0f7 commit 6eb04b3
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 6eb04b3

Please sign in to comment.