Hi, this is not so simple because both formats are treated differently. Here are instructions:
1. You need to set the format of the custom data field (from the visual editor) to: (dd_M_yy)
2. You need to put the following code isnide the page of the file viewer, right below the shortcode (in order to re-format the upload date):
<script type="text/javascript">
var scr = document.createElement("SCRIPT");
scr.type = "text/javascript";
scr.src = "https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.17.1/moment.min.js";
document.body.appendChild(scr);
wfu_tweak_browser_convert_date = function(bid) {
var dates = document.querySelectorAll(".wfu_browser-" + bid + " span.wfu_display_date");
var datadates = document.querySelectorAll(".wfu_browser-" + bid + " input.wfu_data_date");
var unix = document.querySelectorAll(".wfu_browser-" + bid + " input.wfu_data_date_sort");
for (var i = 0; i < dates.length; i++) {
var dtstr = moment.unix(unix[i].value).format("DD_MMM_YYYY");
dates[i].innerHTML = dtstr;
datadates[i].value = dtstr;
}
}
if (!window["wfu_browser_update_html_orig"]) {
window["wfu_browser_update_html_orig"] = wfu_browser_update_html;
wfu_browser_update_html = function(bid, html) {
window["wfu_browser_update_html_orig"](bid, html);
wfu_tweak_browser_convert_date(bid);
}
}
wfu_addEventHandler(window, "load", function() { wfu_tweak_browser_convert_date(1); });
</script>
Test it and let me know.
Nickolas