Use dateformat outside the function
-
Hi again,
After hours of trying another issue.
I’m building a date format switch using this tutorial.
I have changed the converter to change the php-dateformat into js-dateformat:
// set datepicker date formats for europe and us function datepicker_dateformat($output) { if ($output == 'j F Y' || $output == 'd/m/Y') { $output = 'dd-mm-yy'; } else { $output = 'yy-mm-dd'; } return $output; }
Question, how do I retrieve the $output for use as dateformat in the value of my date input field?
value="<?php echo date_i18n( get_option( 'date_format' ), esc_attr( $event_date ) ); ?>"
I know I have to replace the date_format part, but what should I add here?
Guido
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Use dateformat outside the function’ is closed to new replies.