hmmm ... trying, but not getting it to work. how can I change the date format for the datepicker (hold it) in the email confirmations ?
Use the datepicker as a shopper field. I am able to change the format in vmjsapi.php directly (altFormat: "dd-mm-yy") but where can I format the date for the admin and user confirmation emails ?
Its showing me "2016-04-08" for example ... not what I want. Modifying "vmjsapi.php" is also useless, since an update will overwrite it ... and the general LC3, LC4 language overwrites do not work here.
Help ? J 3.5 VM 3.0.14
and the COM_VIRTUEMART_DATE_FORMAT_INPUT_J16="d.m.y" constant is obviously not doing anything here, getting "2016-04-08" ???
I over ride the date format at the template with JS
something like below then the date is stored as i want it
jQuery(document).ready( function($) {
$(document).on( "focus",".datepicker", function() {
if(this.id == 'vm_deliver_date_field_text'){ //id of datepicker
$( this ).datepicker({
dateFormat:"dd-mm-yy"
}
}
});
});
code not checked
hmmm ... I will have to try that - if I read that right, add the function in the template/js/template.js - and replace the "vm_deliver_date_field_text" with the field name ... Hmmm, not tried it, but are you sure that this will allow me to format the datepicker date format up to the invoice.php and mail_html.php level ?
It can go anywhere that is loaded in the user fields dialog
in my case lately I used it in templates\xxxxxx\html\com_virtuemart\cart\default_cartfields.php
re format.. this is the whole point.. it SAVES the string as dd-mm-yy or whatever in the orders_userinfos table so no conversion is needed anywhere .. it is done
perfect ... will try that tomorrow - Danke