Hello everybody I tried to follow many post and guides but with results not according to my needs. I need a simple meta box that catches a data timestamp like the standard one in Wordpress posts or pages. I've created a metabox but the
type="date"attribute to HTML form prints a datepicker in english format and I need to translate it in italian. The standard date picker from Wordpress is allready translated in Italian... I don't want to install a plugin because I've created a plugin for custom post type on my own and I'm updating the code with these new functionalities. I'm going to paste my code below. Thanks , in advance.
<?php
function arrivo_meta_box_markup($object)
{
wp_nonce_field(basename(__FILE__), "meta-box-nonce");
?>
<div>
<label for="arrivo_meta_box">Data arrivo in negozio</label>
<input name="arrivo_meta_box" type="date" value="<?php echo get_post_meta($object->ID, "arrivo_meta_box", true); ?>">
</div>
<?php
}
type="date"
is handled by the browser, as it's a native control. So it should reflect the user's browser language.