Files
band-management/resources/vuexy-admin-v10.11.1/html-version/Bootstrap5/vuexy-html-admin-template/full-version/assets/js/offcanvas-add-payment.js

32 lines
742 B
JavaScript

/**
* Add Payment Offcanvas
*/
'use strict';
document.addEventListener('DOMContentLoaded', function (e) {
// Invoice amount
const paymentAmount = document.querySelector('.invoice-amount');
if (paymentAmount) {
paymentAmount.addEventListener('input', event => {
paymentAmount.value = formatNumeral(event.target.value, {
numeralThousandsGroupStyle: 'thousand'
});
});
}
// Datepicker
const date = new Date(),
invoiceDateList = document.querySelectorAll('.invoice-date');
if (invoiceDateList) {
invoiceDateList.forEach(function (invoiceDateEl) {
invoiceDateEl.flatpickr({
monthSelectorType: 'static',
defaultDate: date,
static: true
});
});
}
});