I’m using this code but the output results in 01.01.70. Clearly my code is wrong. But for the life of me I don’t know where. The date comes from datefield ACF called ‘datum_event’.
if ( function_exists( 'get_field' ) ) {
$date = get_field( 'datum_event' );
if ( $date && is_string( $date ) ) {
$html .= '
' . date( 'd.m.y', strtotime( $date ) ) . '
';
}
}
I was expecting to have the result of the input in the ACf datepicker.