• I did read Meitar’s complete guide, and I searched this forum and elsewhere.
    In Google Sheets, my column with dates formatted like Dec 12 sorts properly. Does Inline…Viewer receive only the displayed data (“Dec 15”), not the date data (44910, or 2022/12/15)?
    DataTables.net seems to only address this kind of question by talking javascript. I can do some coding but not javascript. Do I need to learn Javascript just for this problem? Am I right that Inline Google Spreadsheet Viewer does not need me to change its code, I just need to learn how to use what’s already coded?
    My temporary (bad) solution is to have two columns, one that people can read (for example “Dec 15”) and one for sorting (for example 2022/12/15). For people on cellphones adding a 7th column makes things far too tight. I need to find how to let people sort on a column that appears like “Dec 15”.
    Help, anyone? (I know the plugin creator Meitar helped for years but has set a boundary. Anyone else?)

    Besides Google, I searched this plugin’s support forum and also all the WordPress support forums for “sort by day” and “sort by date”. To my surprise, no relevant answer.
    One answer (relevant to a different plugin, WP Data Access) was to change WordPress’ settings for how the date is displayed. I found that under Settings > General, but that had no effect.

    • This topic was modified 1 year, 11 months ago by Jonathon N.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Not sure if I understand and the website link is not working for me.

    Thread Starter Jonathon N

    (@imagiscapeca)

    I should have said: Although the date column sorts properly in Google Sheets, on my site, using the Inline…Viewer plugin, the dates are sorted alphabetically.

    DataTables.net says I can get dates formatted like “Dec 15” to be recognized as dates, and thus sorted chronologically, if I upgrade DataTables from 1.10 (used by this plugin) to 1.12. Now I need to find how to upgrade to 1.12.

    Alternatively I can install a plugin from DataTables.net – a plugin to a part of a plugin – a plugin to the DataTables part of Inline…Viewer.

    Looking at the contents of the Inline…Viewer plugin, I can’t see how to install either DataTables 1.12 or DataTables’ Date-and-Time plugin.

    Yesterday for the first time in 10 years my host was down for 15 minutes, but the link should work now.

    • This reply was modified 1 year, 11 months ago by Jonathon N.
    • This reply was modified 1 year, 11 months ago by Jonathon N.
    Thread Starter Jonathon N

    (@imagiscapeca)

    I may have found how to upgrade to DataTables 1.12.

    From my reply to the reply at https://www.datatables.net/forums/discussion/74872/sort-by-date-works-in-google-sheets-but-datatables-plugin-sees-dates-as-text-need-no-javascript:

    […] I downloaded the DateTime plugin (and others) but can’t see where to install them within WordPress’s Inline Google Sheets Viewer plugin. (I can see the Inline…Viewer plugin’s contents via FTP.)

    I also downloaded DataTables 1.13.1. Same problem.

    I tried the CDN method, but I can’t find where I would paste the <link…> or the <script…> within Inline…Viewer’s files.

    I did replace “1.10.20” with “1.13.1” in 2 places within inline_gdocs_viewer.php, but
    not using the same code as provided in the CDN section of the Download page.

    https://cdn.datatables.net/1.10.20/css/jquery.dataTables.min.css
    became
    https://cdn.datatables.net/1.13.1/css/jquery.dataTables.min.css

    https://cdn.datatables.net/1.10.20/js/jquery.dataTables.min.js
    became
    https://cdn.datatables.net/1.13.1/js/jquery.dataTables.min.js

    It didn’t totally break my site, so maybe that worked.
    […]

    Now that I have 1.13.1, how do I get the column with dates appearing like “Dec 15” to be processed as dates?

    Changing to 1.13.1 made my table’s background color become transparent. I have tried at least 12 css hacks. How can I get it to return to a white background?

    You don’t happen to know how I can get it to return to a white background, do you?

    I might be doing the CSS wrong, but it seems the CSS gets over-written or ignored by DataTables.

    Oh – it’s white when the screen width is narrow. I will delete this if I solve it.

    I have a breakpoint at 900px but none of my media size css includes background-color.

    In https://cdn.datatables.net/1.13.1/css/jquery.dataTables.min.css I found
    table.dataTable tbody tr{background-color:transparent}
    so in WordPress’s Customization section, the Additional CSS panel, I added:
    table.dataTable tbody tr{background-color:white}
    but that had no effect, so I tried
    table.igsv-table tbody tr{background-color:white}.
    Still no effect.

    I also tried
    tbody tr {background-color:white}.
    tr {background-color:white}.

    • This reply was modified 1 year, 11 months ago by Jonathon N.
    • This reply was modified 1 year, 11 months ago by Jonathon N.
    Thread Starter Jonathon N

    (@imagiscapeca)

    It’s too late to edit the above post – it’s not possible now. I got the background-color issue fixed, finally. Hard to say how.

    I would mark this resolved, but I still haven’t figured how to tell datatables (1.13) to interpret Dec 15 for example as a date.

    Yes, the page is back. ??

    Truthfully, I use IGSV without any DataTables add-on. Therefore, I can’t advise you on anything related to DataTables upgrades to higher versions. Certainly, the IGSV author calls upon DataTable significantly using its features, but how is beyond my knowledge. Whether an upgrade of DataTables even affects IGSV is also questionable.

    I assume the table on your page was rendered by IGSV code, correct? If so, you might share that code as to offer more details.

    As far as the table background, it appears to be transparent and the colors are via your theme.

    In regards to the table widths, I agree, 7 columns is too many … especially for mobile viewing. My suggestion is to simplfy the table content, link the class name to a page that offers complete details.

    • This reply was modified 1 year, 11 months ago by GMRobbins.
    • This reply was modified 1 year, 11 months ago by GMRobbins.
    • This reply was modified 1 year, 11 months ago by GMRobbins.
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Sort by Date works in GSheets, but Viewer sees Dates like Dec 12 as text strings’ is closed to new replies.