• Resolved seabusch

    (@seabusch)


    hello Awais,

    wrote you 2 years ago and you mentioned to bring it into the code?

    any changes?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Awais

    (@awais300)

    Hi @seabusch

    Apologies for not being able to check it earlier. Could you please take a look at this screenshot: https://prnt.sc/u28CtMD8tIF8 and let me know if you are referring to that specific section of the calendar to be displayed in a 24-hour format.

    yuriimytro

    (@yuriimytro)

    Yes, like this:?https://prnt.sc/u28CtMD8tIF8
    how I can do this?

    Plugin Author Awais

    (@awais300)

    You can use the provided hook to modify the calendar view, enabling the display of time in the 24-hour format. However, your still have to utilize the backend settings, such as those accessible at https://i.imgur.com/QZ1TYNV.png, to adjust the formatting of the input field.

    // Utilize the following filter to customize the time format for the calendar view.
    add_filter('gf_awp_calendar_time_format', 'filter_gf_awp_calendar_time_format', 10, 2);
    
    function filter_gf_awp_calendar_time_format($format, $form) {
        // This modification exclusively impacts the time format within the Calendar view.
        // Implement the moment.js format (refer to https://momentjs.com/docs/#/parsing/string-format/)
    
        return 'HH:mm';
    }

    Code goes in function.php file of the active child theme (or active theme).

    Best! Sanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘change am – pm ot 24 hours’ is closed to new replies.