Hi,
I’m in the process of making my plugin fully compatible with CP.
One of the things I ran into is the datepicker, which is currently powered by jQuery (which will be removed from CP in the future).
I can change the date input field to type="date"
and this looks fine in the editor.
But the date format depends on the browser language and this can differ from the one in my CP install. I read over here that the datepicker has a default format (yyyy-mm-dd
). Browsers localize that format (change it into mm-dd-yyyy
or dd-mm-yyyy
), based on the language.
I’m using the wp_date()
function to display my date value and that function requires a date format.
How can I get the date format from the datepicker, so I can use it for the wp_date()
function?
Guido