UPDATE_COL not updating date element

Hello guys, I cannot update date element with update_col plugin. Latest github version is installed.
In my table is one column (jdate) with empty date value and need to set current datetime when pressed on this update_col button. The only think I have configured is "Update date" value.
"Update message" gives a message that one record has been updated, but in table is still 0000-00-00 00:00:00
 
Last edited:
I can only guess but from what I read elsewhere here, the jdate element is very new and might have some hiccups, still.
Use the good old standard "date" element instead (no "j")?
 
Thank you for your feedback, but the same issue is also with legacy date element.
In the meantime i found a workaround - standard update option with eval value "return date("Y-m-d H:i:s");".
 
No, I meant what did you have the update_col configured to update "To"?

As far as I know, the only way to do it would be to do what you wound up doing, enable 'eval' and return a formatted date.

-- hugh
 
Yes, but there is one option called "Update date" on "Update" tab and I expected that this is something like preset - just choose from dropdown element name, where I need to update date value and thats it.
 
Works OK for me.

But ... I just read your OP closer:

The only think I have configured is "Update date" value.

That's why it isn't working. The code checks to see if any fields have been configured for update, and if not, it just returns without doing anything. So if all you've set is the "Update date" option, without configuring anything in the actual fields to update option (or allowing user selection), then it's not going to update the date.

Basically, that "Update date" is a "record when someone changed values on this row with update_col", and if it isn't changing any values, then it doesn't update the date.

I guess you could argue that it should consider the "update date" and "update user" as "changed values", so if they are set even if no fields are selected for update, it should still update the date/user. But as-is, it doesn't.'

So if the only field you want to update is a date, you'll have to do it manually, as a normal field update.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top