1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-12 22:22:32 +01:00

Adjustments for autofill

This commit is contained in:
David Bomba 2022-12-15 18:33:49 +11:00
parent 63d0bbb9ae
commit 9b1cc121cd

View File

@ -76,7 +76,21 @@
@push('footer')
<script defer>
// $(function() {
$(function() {
document.getElementsByClassName("expiry")[0].addEventListener('change', function() {
str = document.getElementsByClassName("expiry")[0].value.replace(/\s/g, '');
const myArray = str.split("/");
document.getElementsByName('expiry-month')[0].value = myArray[0];
document.getElementsByName('expiry-year')[0].value = myArray[1];
});
// var myCard = $('#my-card');
// myCard.EXPIRY_USE_DROPDOWNS = true;
@ -89,7 +103,7 @@
// document.getElementsByName('expiry-year')[0].setAttribute("autocompletetype", "cc-exp-year");
// document.getElementsByName('expiry-year')[0].setAttribute("autocomplete", "on");
// });
});
</script>
@endpush