Files
safekat/httpdocs/themes/vuexy/js/offcanvas-add-payment.js
2024-11-07 20:17:58 +01:00

31 lines
565 B
JavaScript

/**
* Add Payment Offcanvas
*/
'use strict';
(function () {
// Invoice amount
const paymentAmount = document.querySelector('.invoice-amount');
// Prefix
if (paymentAmount) {
new Cleave(paymentAmount, {
numeral: true
});
}
// Datepicker
const date = new Date(),
invoiceDateList = document.querySelectorAll('.invoice-date');
if (invoiceDateList) {
invoiceDateList.forEach(function (invoiceDateEl) {
invoiceDateEl.flatpickr({
monthSelectorType: 'static',
defaultDate: date
});
});
}
})();