sandi123 Posted January 21, 2022 Share Posted January 21, 2022 <script> $(document).ready(function() { var printCounter = 0; // Append a caption to the table before the DataTables initialisation $('#example').append('<caption style="caption-side: bottom; text-align: right;">Sandi Dwi Januar, Padaherang 17 Januari</caption>'); $('#example').DataTable( { dom: 'Bfrtip', buttons: [ 'copy', { extend: 'excel', messageTop: 'The information in this table is copyright to Sirius Cybernetics Corp.', messageBottom: 'Sandi Dwi Januar' }, { extend: 'pdf', messageTop: 'The information in this table is copyright to Sirius Cybernetics Corp.', messageBottom: 'Sandi Dwi Januar' }, { extend: 'print', messageTop: function () { printCounter++; if ( printCounter === 1 ) { return 'Penanggung Jawab: Sandi Dwi Januar'; } else { return 'You have printed this document '+printCounter+' times'; } }, messageBottom: '<h6 style="margin-left: 850;">Sandi Dwi Januar</h6> <br><br> <h6 style="margin-left: 850px;">Padaherang, 20 Januari 2022</h6>' } ] } ); } ); </script> Quote Link to comment https://forums.phpfreaks.com/topic/314442-how-to-add-date-format-to-export-pdf-in-datatables/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.