cmsnet
Forum Replies Created
-
Forum: Plugins
In reply to: [TablePress - Tables in WordPress made easy] Date Problem With csv ImportI made the error of saving the Excel file as .xls instead of .csv
When I imported the table into Tablepress it messed up some of the formatting by swapping some of the dates to the US date system.
After re-saving the Excel file in the .csv format and importing it into Tablepress everything worked fine.
Forum: Plugins
In reply to: [TablePress - Tables in WordPress made easy] Date Problem With csv ImportTobias,
I consider this case to be resolved.
Keep up the great work – thank you.
Forum: Plugins
In reply to: [TablePress - Tables in WordPress made easy] Date Problem With csv ImportHi Tobias,
Message on it way with the subject:
Fixed Header – Login Details
Forum: Plugins
In reply to: [TablePress - Tables in WordPress made easy] Date Problem With csv ImportHi Tobias,
Yes I can confirm the fixed header extension plugin is installed and activated.
This is the short code I pasted into the page:
[table id=7 datatables_fixedheader=”top” /]
I have also checked that the table id is correct.
Forum: Plugins
In reply to: [TablePress - Tables in WordPress made easy] Date Problem With csv ImportHi Tobias,
Removing the
and
sorted the fonts, but for some reason the header is still disappearing when scrolled.
Could it be the theme I am using?
Forum: Plugins
In reply to: [TablePress - Tables in WordPress made easy] Date Problem With csv ImportGreat job Tobias – Thank you.
The problem was indeed the empty cells.I replaced all the empty cells with: 00/00/0000 and all the date sorting now works.
With reference to the same link above: for some reason I cant get the DataTables FixedHeader to work on the table.
I have installed the FixedHeader plugin and pasted the following code into the page:
[table id=7 datatables_fixedheader=”top” /]
Am I missing anything?
Thanks Tobias.
Forum: Plugins
In reply to: [TablePress - Tables in WordPress made easy] Date Problem With csv ImportHi Tobias,
Thanks for your speedy reply.
I have imported some dummy data back into the test site for you to take a look at: https://www.table.cmsnetdesign.com.au/date-test/
The Test Date column is the one giving trouble. The other columns I populated by typing them instead of cut and paste.
I have left the date formula out until you have had a chance to take a look.
When you click on the Test Date Column it looks like it is sorting by the first digits.When you click on the other date columns its sort it out in some sort of order but not in the way that the Test Date is trying to,
Also I noticed that excel drops the zero from the first date digit, would this affect the import/export into Tablepress?
Let me know if you want me to put the European date code on the test page.
Thanks Tobias.
Forum: Plugins
In reply to: [TablePress - Tables in WordPress made easy] Formula to Highlight Date ExpiryNo luck unfortunately. It was worth a try though.
Thanks for your suggestion Tobias.
Forum: Plugins
In reply to: [TablePress - Tables in WordPress made easy] Formula to Highlight Date ExpiryGreat thank you so much Tobias.
I will give it a try and post back here to let you know if it works.
Forum: Plugins
In reply to: [TablePress - Tables in WordPress made easy] Formula to Highlight Date ExpiryHi Tobias,
Out of interest I looked to see if I could find a solution and found the following code that works in an HTML table, but because of my lack of programming skills I would not have a clue where or how to try and get the script to work in Tablepress:
HTML
<table>
<tr><td>1</td><td>coca cola</td><td>2014-08-17</td></tr>
<tr><td>2</td><td>bread</td><td>2014-02-13</td></tr>
<tr><td>3</td><td>apple</td><td>2014-01-20</td></tr>
<tr><td>4</td><td>cookies</td><td>2014-04-03</td></tr>
</table>Jquery
var parents = document.getElementsByTagName(“tr”)
for (var i = 0, ii = parents.length; i < ii; i++) {
var parent = parents[i],
children = parent.childrenfor (var j = 0, jj = children.length; j < jj; j++) {
var elem = children[j]
if (j % 3 === 2) {
var dateElement = elem.innerHTML;
var dateArray = dateElement.split(“-“);
var prevTime = new Date(dateArray);
var thisTime = new Date();
var diff = prevTime.getTime() – thisTime.getTime();
var days = 1000*60*60*24;
var diffInDays = Math.ceil(diff / days);
if (diffInDays < 0) {
elem.style.color = “#ffa500”;
}
else if (diffInDays <= 14) {
elem.style.color = “#ff0000”;
}
}
}
}Any ideas if it may be possible?
Many thanks.
Forum: Plugins
In reply to: [TablePress - Tables in WordPress made easy] Formula to Highlight Date ExpiryThank you for letting me know Tobias.
Forum: Plugins
In reply to: [TablePress - Tables in WordPress made easy] Dates Not Sorting CorrectleyHello Tobias,
I think I have managed to resolve the above issue.
I finally found a thread where you suggested pasting the following code:
“aoColumnDefs”: [ { “sType”: “date-eu”, “aTargets”: [ 1,2 ] } ]
The code was pasted here:
Tablepress,
Table Name,
Edit,
Features of the Data Tables Java Script Library (bottom of page)
Custom CommandsThe above code was not initially working because I was unaware that the column numbering begins at 0.
Once I understood that [ 1,2 ] represent the columns that have date fields everything worked just fine.
Thank you for such a great Worpress plugin.