Support

Account

Home Forums General Issues Date-Formatting using 2 Dates Reply To: Date-Formatting using 2 Dates

  • You should be able to hook into the admin footer and add in any kind of datepicker option as you need by field ID:

    /**
     * Modify ACF Datepicker Formatted Field
     *
     * @return void
     */
    function theme_prefix_admin_footer() {
    
    	?>
    
    		<script>
    
    			jQuery( document ).ready( function( $ ) {
    		
    				let $datepicker = $( '#acf-field_5b16a9d5df47c + .hasDatepicker' );
    				
    				$datepicker.datepicker( 'option', {
    					altFormat: 'dd. M yy'
    				} );
    				
    			} );
    
    		</script>
    
    	<?php
    
    }
    add_action( 'admin_footer', 'theme_prefix_admin_footer' );