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' );
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.