Skip to content

Commit

Permalink
bugfix: toggle 'disabled' property of datepicker altfield hidden-type…
Browse files Browse the repository at this point in the history
… input element
  • Loading branch information
chilek committed Jun 16, 2023
1 parent 095687a commit 1d25c77
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion templates/default/customer/customeradd.html
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,8 @@ <H1>{$layout.pagetitle}</H1>
});

$('#icexpires-indefinitely').change(function() {
$('#icexpires').datepicker("option", "disabled", $(this).prop('checked'));
var checked = $(this).prop('checked');
$('#icexpires').datepicker("option", "disabled", checked).closest('.lms-ui-date-container').prev().prop('disabled', checked);
}).change();

if (!$('[name="customeradd[pin]"]').val().length) {
Expand Down
3 changes: 2 additions & 1 deletion templates/default/customer/customereditbox.html
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,8 @@
});

$('#icexpires-indefinitely').change(function() {
$('#icexpires').datepicker("option", "disabled", $(this).prop('checked'));
var checked = $(this).prop('checked');
$('#icexpires').datepicker("option", "disabled", checked).closest('.lms-ui-date-container').prev().prop('disabled', checked);
}).change();

var inSubmit = false;
Expand Down

0 comments on commit 1d25c77

Please sign in to comment.