{"id":1962825,"date":"2024-09-12T10:01:08","date_gmt":"2024-09-12T14:01:08","guid":{"rendered":"https:\/\/theeventscalendar.com\/knowledgebase\/?p=1962825"},"modified":"2025-10-23T12:29:29","modified_gmt":"2025-10-23T16:29:29","slug":"how-to-customize-the-default-start-and-end-times-for-new-events-in-the-events-calendar","status":"publish","type":"post","link":"https:\/\/theeventscalendar.com\/knowledgebase\/how-to-customize-the-default-start-and-end-times-for-new-events-in-the-events-calendar\/","title":{"rendered":"How to customize the default Start and End Times for New Events in the Events Calendar"},"content":{"rendered":"\n<p>When we create a new event with the Events Calendar plugin, by default, the start time is <strong>8:00 am<\/strong> and the end time is <strong>5:00 pm<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"838\" height=\"246\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/09\/image-1.png\" alt=\"\" class=\"wp-image-1962827\" srcset=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/09\/image-1.png 838w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/09\/image-1-300x88.png 300w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/09\/image-1-768x225.png 768w\" sizes=\"auto, (max-width: 838px) 100vw, 838px\" \/><\/figure>\n\n\n\n<p>While it is true that we can change them to our convenience, it can be useful to modify these default values \u200b\u200bso that every time we create new events, we have the start and end times customized to the hours we use the most.<\/p>\n\n\n\n<p>The following code snippet will help us achieve this and customize our plugin:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\nadd_filter( &#039;tribe_events_meta_box_timepicker_default&#039;, &#039;my_custom_timepicker_defaults&#039;, 10, 3 );\n\nfunction my_custom_timepicker_defaults( $default, $type, $date ) {\n    if ( $type == &#039;start&#039; ) {\n       return &quot;09:00:00&quot;;\n    }\n\n    if ( $type == &#039;end&#039; ) {\n       return &quot;16:00:00&quot;;\n    }\n\n    return $default;\n}\n<\/pre><\/div>\n\n\n<p>Of course, we can modify lines 5 and 9 to adjust the times we need.<\/p>\n\n\n\n<p>If you are wondering how or where to add this code snippet, you can refer to this <strong><a href=\"https:\/\/theeventscalendar.com\/knowledgebase\/best-practices-for-implementing-custom-code-snippets\/\">Using Custom Code Snippets<\/a><\/strong> guide.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>When we create a new event with the Events Calendar plugin, by default, the start time is 8:00 am and the end time is 5:00 pm. While it is true that we can change them to our convenience, it can be useful to modify these default values \u200b\u200bso that every time we create new events,&#8230;<\/p>\n","protected":false},"author":3,"featured_media":1955565,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_swpsp_post_exclude":false,"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"ep_exclude_from_search":false,"footnotes":""},"categories":[130,79],"tags":[],"stellar-product-taxonomy":[161],"class_list":["post-1962825","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-advanced-post-manager","category-snippets","stellar-product-taxonomy-the-events-calendar"],"acf":[],"taxonomy_info":{"category":[{"value":130,"label":"Managing Events"},{"value":79,"label":"Snippets"}],"stellar-product-taxonomy":[{"value":161,"label":"The Events Calendar"}]},"featured_image_src_large":["https:\/\/images.theeventscalendar.com\/kb\/uploads\/2023\/02\/social-share-1024x538.png",1024,538,true],"author_info":{"display_name":"Jaime Marchwinski","author_link":"https:\/\/theeventscalendar.com\/knowledgebase\/author\/jaimetri-be\/"},"comment_info":0,"category_info":[{"term_id":130,"name":"Managing Events","slug":"advanced-post-manager","term_group":0,"term_taxonomy_id":130,"taxonomy":"category","description":"","parent":61,"count":33,"filter":"raw","term_order":"0","cat_ID":130,"category_count":33,"category_description":"","cat_name":"Managing Events","category_nicename":"advanced-post-manager","category_parent":61},{"term_id":79,"name":"Snippets","slug":"snippets","term_group":0,"term_taxonomy_id":79,"taxonomy":"category","description":"","parent":0,"count":44,"filter":"raw","term_order":"0","cat_ID":79,"category_count":44,"category_description":"","cat_name":"Snippets","category_nicename":"snippets","category_parent":0}],"tag_info":false,"_links":{"self":[{"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1962825","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/comments?post=1962825"}],"version-history":[{"count":4,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1962825\/revisions"}],"predecessor-version":[{"id":1962830,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1962825\/revisions\/1962830"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/media\/1955565"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/media?parent=1962825"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/categories?post=1962825"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/tags?post=1962825"},{"taxonomy":"stellar-product-taxonomy","embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/stellar-product-taxonomy?post=1962825"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}