Geen omschrijving
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

offcanvas-add-payment.js 742B

12345678910111213141516171819202122232425262728293031
  1. /**
  2. * Add Payment Offcanvas
  3. */
  4. 'use strict';
  5. document.addEventListener('DOMContentLoaded', function (e) {
  6. // Invoice amount
  7. const paymentAmount = document.querySelector('.invoice-amount');
  8. if (paymentAmount) {
  9. paymentAmount.addEventListener('input', event => {
  10. paymentAmount.value = formatNumeral(event.target.value, {
  11. numeralThousandsGroupStyle: 'thousand'
  12. });
  13. });
  14. }
  15. // Datepicker
  16. const date = new Date(),
  17. invoiceDateList = document.querySelectorAll('.invoice-date');
  18. if (invoiceDateList) {
  19. invoiceDateList.forEach(function (invoiceDateEl) {
  20. invoiceDateEl.flatpickr({
  21. monthSelectorType: 'static',
  22. defaultDate: date,
  23. static: true
  24. });
  25. });
  26. }
  27. });