Use php date format function in jQuery datepicker
-
Hi there,
This is my datepicker code:
jQuery(document).ready(function ($) { $( "#date" ).datepicker({dateFormat: "dd-mm-yy"}); });
As you can see I have hardcoded the date format.
For my frontend code I use this to get date format set in WP Dashboard > Settings > General:
date_i18n( get_option( 'date_format' ), $date );
Is it somehow possible to add this to the js datepicker file too?
Guido
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Use php date format function in jQuery datepicker’ is closed to new replies.