Support

Search results for ""

Sorry, no results found. Perhaps you would like to search the documentation?
All Topics
kontakt13

Inline edit date/time field 24 hour not AM/PM?

Hi I just bought the plugin and using the Toolset Types add on. I have date/time custom field and it seems that inline editing uses AM/PM time and not 24 hours like I am used to. Can I change this somewhere.

I am using Custom: d-m-Y H:i for the formatting in Date Format settings

5 years, 1 month ago
kontakt13

Also the existing time is shown in the inline edit as 8am even though the value of the field is 20:00 so it should be PM… But I hope I can change it to 24 hours.

5 years, 1 month ago
Stefan van den Dungen Gronovius
Developer

Hello,

I would give you the following snippet, but since our new Bulk Edit feature, this specific snippet does not seem to work anymore. I will change our code so that the following code will work again on the next update.

/**
* Change inline eit for Types date fields to 24 hour format
*
* @param $data array
* @param $column AC\Column
*
* @return mixed
*/
function acp_editing_date_time_format( $data, $column ) {
if ( $column instanceof ACA\Types\Column ) {
$data['timeformat'] = 24;
}
return $data;
}
add_filter( 'acp/editing/view_settings', 'acp_editing_date_time_format', 10, 2 );

5 years, 1 month ago
kontakt13

I just updated to new version. Should I add the snippet to theme functions file?

5 years, 1 month ago
Stefan van den Dungen Gronovius
Developer

Yes, adding the snippet to your website (theme or custom plugin) should work.
If you have any questions about the snippet, please contact me at support@admincolumns.com

5 years, 1 month ago

You must be logged in to reply to this topic.