DataTables 1.12 released

DataTables 1.12 released

allanallan Posts: 63,482Questions: 1Answers: 10,467 Site admin
edited May 2022 in Announcements

I'm delighted to announce the release of DataTables 1.12! This is an incremental upgrade, modernising many parts of our default styling and significantly improving internationalisation abilities.

New features include:

  • Built in date / time rendering and ordering
  • Automatic locale rendering for numbers
  • Ordering style improvements
  • Row colouring improvements

I've written a full blog post about what is in 1.12 if you would like more details on these features.

Also released today are updates to almost every extension for DataTables.

Enjoy :)
Allan

Edit 1.12.1 is now available to address a couple of issues with internationalisation in 1.12.

Replies

  • parchmanparchman Posts: 2Questions: 1Answers: 0

    Hi allan, very cool! Just a little remark: A lot of people used their own spinner via the language option. Now they've got two spinners;)

    div.dataTables_processing>div:last-child {
    display:none;
    }
    

    solves the problem by hiding the newly introduced spinner:)

  • BraneSystemsBraneSystems Posts: 3Questions: 0Answers: 0

    I am a bit confused as I have used datatables for the last few years with bootstrap and in the included JS it would append modal-header to the DTE-Header class and this would allow bootstrap CSS to take over the CSS of the modals for add, edit and such. This was last working in 1.11.5 but when we updated to 1.12.1 the append functionality to add the classes to the modals are not there. Am I missing a file or am I needing to add it manually into our own JS.

    Thank you.

  • allanallan Posts: 63,482Questions: 1Answers: 10,467 Site admin

    DataTables core doesn't actually use any modals, so the change to 1.12.1 shouldn't have effected this. Did you upgrade anything else at the same time? Are you basically saying you aren't getting a Bootstrap model now, but you were before? My guess (from the DTE part) is that you are using Editor, but haven't loaded in the Bootstrap integration. The download builder is the best way to make sure you get all the right files.

    Allan

  • BraneSystemsBraneSystems Posts: 3Questions: 0Answers: 0
    edited August 2022

    Hey allan sorry for the delay. So what i have seen looking through datatables.js on 1.11.5 vs 1.12. On the 1.12 I have used the builder for the CDN link and downloaded the new editor as well but no luck on just the modals(all other bootstrap css is applying like on the table and buttons and such). I have included the code from 1.11.5 for reference

    1.11.5 -
    '$.extend( true, $.fn.dataTable.Editor.classes, { header: { wrapper: DTE_Header modal-header }, body: { wrapper: DTE_Body modal-body }, footer: { wrapper: DTE_Footer modal-footer }, form: { tag: form-horizontal, button: btn, buttonInternal: btn btn-outline-secondary }, field: { wrapper: DTE_Field form-group row, label: col-lg-4 col-form-label, input: col-lg-8, error: error is-invalid, msg-labelInfo: form-text text-secondary small, msg-info: form-text text-secondary small, msg-message: form-text text-secondary small, msg-error: form-text text-danger small, multiValue: card multi-value, multiInfo: small, multiRestore: card multi-restore } } );

    Now this could have been created by us to use the bootstrap better but I didnt think that was the case as I do not remember writing this code.

  • allanallan Posts: 63,482Questions: 1Answers: 10,467 Site admin

    Ah right - that code is part of Editor (and bundled into the DataTables JS file if you are using the download builder for it). Which version of Bootstrap are you using? The Editor Bootstrap examples appear to be working okay, so if you could give me a link to your page that is having the problems, I can take a look.

    Thanks,
    Allan

  • BraneSystemsBraneSystems Posts: 3Questions: 0Answers: 0

    Oh okay so looking at the example I see that I am missing

    https://editor.datatables.net/extensions/Editor/js/editor.bootstrap5.min.js

    Which this has the bootstrap extensions. I am not sure why before we didnt have to include this file but I have a suspicions someone might have consolidated the files.

    Thank you so much! If you need to delete our comments for being too stupid that is okay :p

  • allanallan Posts: 63,482Questions: 1Answers: 10,467 Site admin

    Not at all - it was a totally valid question! Great to hear you've got it working the way you need now.

    Allan

Sign In or Register to comment.