Im creating a datefield that disables when Paid = Yes.
What i did I was able to disable only the input box through Javascript, and when the Paid = Yes, datepicker should be hidden. And the problem was hiding the datepicker wont work. Here’s my code:
if (invoiceStatus === "Closed Accepted") {
if (paid == "yes") {
document.getElementById('expected_pay_date').disabled = true;
$('#expected_pay_date_trigger').hide();
}
else if (paid == "no") {
document.getElementById('expected_pay_date').disabled = false;
$('#expected_pay_date_trigger').show();
}
}