Open trentbaur opened 1 year ago
Seems like its an easy fix, I had same issue with code after update to 4.3. I just replaced as.character(data[, x], format = "%m/%d/%Y"), with format(data[, x], format = "%m/%d/%Y") Not sure if that will break older code, but using trace I quickly tried it and it worked.
Where would one apply this fix to the example provided? It is not at all clear to me.
Hi, I made the fix in the package by downloading it and creating my own package. However it did not fix the issue with the date, I spoke too soon. I fixed warning, but my dates are still getting messed up whenever I update a table. So seems the error is something else. I just went back to 4.2.1, that was the easiest fix.
Seems like its an easy fix, I had same issue with code after update to 4.3. I just replaced as.character(data[, x], format = "%m/%d/%Y"), with format(data[, x], format = "%m/%d/%Y") Not sure if that will break older code, but using trace I quickly tried it and it worked.
Having same issue after switching from R 4.2.2 to 4.3 as well. Seems a compatibility issue?
The issue seems to be in the rhandsontable
function in file rhandsontable.R line 75:
if (!useTypes) {
data = do.call(cbind, lapply(data, function(x) {
if (class(x) == "Date")
as.character(x, format = "%m/%d/%Y")
else as.character(x)
}))
data = as.matrix(data, rownames.force = TRUE)
cols = NULL
}
where one should change as.character(x, format = "%m/%d/%Y")
to format(x, "%m/%d/%Y")
.
there are two lines to fix in v.0.3.8:
format(x, "%m/%d/%Y")
format(data[, i], "%m/%d/%Y")
This PR will fix it but it seems to take time to merge it.
I've recently upgraded my setup to
An existing rhandsontable app was failing when trying to copy the date column, returning NA instead of the date. I receive the following warning:
I built an example ShinyApp to reproduce the issue: