Shiftee uses the clock format that you select under Settings–>General in your WordPress dashboard.
However, CMB2, the library that I am using to create the meta boxes, does not let you change the time format in the time picker. This is a known issue with CMB2, and I am monitoring it so that I can implement this as soon as there is a fix for it. In other words, I would love to let you change the format of the time picker, but at the moment it isn’t possible.
Clocking in and out should work even on localhost. What happens when you try to clock in?
Hello, developer for CMB2 here. It is possible to change the time-picker to use 24hr format via the time_format field parameter: https://github.com/CMB2/CMB2/wiki/Field-Types#text_time
To make it 24hr format, you would do something like this:
$cmb->add_field( array(
'name' => __( 'Test Time', 'cmb2' ),
'desc' => __( 'field description (optional)', 'cmb2' ),
'id' => '_yourprefix_demo_time',
'type' => 'text_time',
'time_format' => 'H:i',
) );
Thanks for chiming in, Justin!
These bugs are preventing me from using the general date/time format settings:
https://github.com/CMB2/CMB2/issues/765
https://github.com/CMB2/CMB2/issues/646
Have those bugs been fixed? I’m following them on github, but haven’t seen any activity there for a while.
Good question. Can you please open a new issue describing exactly what you need to do that is causing problems? I can work with you over there and we can get it sorted. Maybe you can help me figure out if those issues are still issues.
I just started a ticket here: https://ww.wp.xz.cn/support/topic/using-wordpresss-date-time-format-settings/
You can find me on WordPress Slack – my username there is morgankay – if it would be easier to discuss it there.
@mrfelkuro: The latest version of Shiftee follows the date and time formats selected under Settings–>General.
Did you ever get clocking in and out to work? If you are still having trouble, can you describe that happens when you clock in and out?