Support

Account

Home Forums General Issues Remove seconds from Time Picker Reply To: Remove seconds from Time Picker

  • It’s possible to add a JS filter to set the arguments for the jQuery Timepicker instantiation.

    Something like the following although I wasn’t able to actually get it working.

    
    (function($) {
      acf.add_filter('date_time_picker_args', function( args, $field ){
        args.units = ['hour', 'minute'];
        return args;		
      });
    })(jQuery);
    

    It’s documented here – https://www.advancedcustomfields.com/resources/adding-custom-javascript-fields/ – but this contradicts the ACF JS API docs which says to use .addFilterhttps://www.advancedcustomfields.com/resources/javascript-api/.