Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix RD Calculator functionality and UI improvements #3339

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tools/RDCalculator.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
document.addEventListener("DOMContentLoaded", function() {
document.getElementById("calculate-Btn3").addEventListener("click", function() {
document.getElementById("calculateRd").addEventListener("click", function() {
const monthlyInstallment = parseFloat(document.getElementById("monthly-installment").value);
const annualInterestRate = parseFloat(document.getElementById("rate1").value);
const timePeriodMonths = parseFloat(document.getElementById("months1").value);
Expand Down Expand Up @@ -31,7 +31,7 @@ document.addEventListener("DOMContentLoaded", function() {
document.getElementById("maturityAmount1").innerText = `Maturity Amount: ${formatter.format(maturityAmount)}`;
});

document.getElementById("clearBtn2").addEventListener("click", function() {
document.getElementById("clearRd").addEventListener("click", function() {
clearInputs();
});

Expand Down
10 changes: 6 additions & 4 deletions tools/sip.html
Original file line number Diff line number Diff line change
Expand Up @@ -2370,23 +2370,25 @@ <h5>Result:</h5>
<form id="recurring-deposit-calculator"
style="display: flex; flex-direction: column; justify-content: center; align-items: center;">
<fieldset>
<legend>Recurring Deposit Calculator</legend>
<div class="form-group">
<label for="monthly-installment">Monthly Installment (β‚Ή):</label>
<input type="number" id="monthly-installment" placeholder="Enter Monthly Installment" required>
<div id="installmentError"></div>
</div>
<div class="form-group">
<label for="rate">Annual Interest Rate (%):</label>
<input type="number" id="rate1" step="0.01" placeholder="Enter Annual Interest Rate" required>
<div id="rateError"></div>
</div>
<div class="form-group">
<label for="months">Time Period (in months):</label>
<input type="number" id="months1" placeholder="Enter Time Period" required>
<div id="monthsError"></div>
</div>
<div class="btn-calculate">
<button id="calculate-Btn3" type="button" class="btn btn-calculate">Calculate</button>
<button id="clearBtn2" type="button" class="btn btn-clear">
<p class="btn-text">Clear</p>
</button>
<button id="calculateRd" type="button" class="btn btn-calculate">Calculate</button>
<button id="clearRd" type="button" class="btn btn-clear"> Clear </button>
</div>
</fieldset>
</form>
Expand Down