Hmm, I think I’m experiencing the same problem. Whatever I tried, my settings aren’t set. Any luck so far?
hi,
you can try it under wp-fullcalendar/wp-fullcalendar.php at around lines 298-368
Hi Angelo,
Could you paste a bit of the code in these lines which you a referring to? Around lines 298-368 I don’t see any code similar. Maybe I’m missing something?
just to confirm, did you mean the time format in the day view?
The time format in day view is ok. But the time shown in axis Format insist on being in am/pm.
It’s the vertical bar in the left of the screen.
Thanx Angelo!
Im going to check this out later today!
Hey Angelo,
I think I miss a file (the one you referred to?) because I don’t have a json.php in my wp-fullcalendar. As you wrote “the file I shared above”; which file do you mean?
Thnx for your help!
you can try this lines, wp-fullcalendar/wp-fullcalendar.php at around lines 298-368
you can try this lines, wp-fullcalendar/wp-fullcalendar.php at around lines 298-368
HI Angelo,
I’m sorry, but I’m afraid I’m missing something. In wp-fullcalendar/wp-fullcalendar.php at around lines 298-368 I do not see any line that is similar to what this post (http://stackoverflow.com/questions/9080944/24-hour-time-format-so-no-am-to-pm-for-fullcalendar) is talking about.
That post refers to a json.php and fullCalendar.js. I don’t have a json.php in wp-fullcalendar. And when I change fullCalendar.js according to the best rated answer nothing happens/changes on the frontend.
Below you’ll see the code in wp-fullcalendar/wp-fullcalendar.php – lines 298-368. Just running the latest version of FullCalendar
$js_vars['wpfc_locale'] = $calendar_languages[$locale_code_short];
}
$js_vars['wpfc_locale']['firstDay'] = $js_vars['firstDay']; //override firstDay with wp settings
apply_filters('wpfc_js_vars', $js_vars);
wp_localize_script('wp-fullcalendar', 'WPFC', $js_vars);
}
/**
* Catches ajax requests by fullcalendar
*/
function ajax(){
global $post;
//sort out args
unset($_REQUEST['month']); //no need for these two
unset($_REQUEST['year']);
$args = array ('scope'=>array(date("Y-m-d", $_REQUEST['start']), date("Y-m-d", $_REQUEST['end'])), 'owner'=>false, 'status'=>1, 'order'=>'ASC', 'orderby'=>'post_date');
//get post type and taxonomies, determine if we're filtering by taxonomy
$post_type = !empty($_REQUEST['type']) ? $_REQUEST['type']:'post';
$args['post_type'] = $post_type;
if( $args['post_type'] == 'attachment' ) $args['post_status'] = 'inherit';
$args['tax_query'] = array();
foreach( get_object_taxonomies($post_type) as $taxonomy_name ){
if( !empty($_REQUEST[$taxonomy_name]) ){
$args['tax_query'][] = array(
'taxonomy' => $taxonomy_name,
'field' => 'id',
'terms' => $_REQUEST[$taxonomy_name]
);
}
}
//initiate vars
$args = apply_filters('wpfc_fullcalendar_args', array_merge($_REQUEST, $args));
$limit = get_option('wpfc_limit',3);
$items = array();
$item_dates_more = array();
Ok, I found the solution to change the am/pm settings in agenda week view. I’ve submitted it here: https://ww.wp.xz.cn/support/topic/solution-to-change-ampm-in-week-and-day-agenda-view