+ Start a Discussion
Elisheva DujovneElisheva Dujovne 

date format of visualforce page not working

i tried to personalize the contact update app to spanish. I could do everything, but the date format until shows like this: mm/dd/yyyy and i want dd/mm/yyyy
User-added image
User-added image
User-added imageUser-added imageUser-added image
Alain CabonAlain Cabon
@Pamela Dujovne

y - year (two digit)
yy - year (four digit)

$( ".selector" ).datepicker({ altFormat: "yy-mm-dd"});

https://api.jqueryui.com/datepicker/#utility-formatDate

Not very "intuitive" but "yyyy" is invalid probably in your case for the input date format while the alt-text uses "yyyy":   $( ".selector" ).datepicker({ appendText: "(yyyy-mm-dd)" });

 
Elisheva DujovneElisheva Dujovne
Thanks for your help! But didn't work!😩 Do you have another idea?
Alain CabonAlain Cabon
There is a file "index.html" when you download the package jquery ui.

https://jqueryui.com/download/

User-added image

Little changes for some tests outside Salesforce:
<!-- Datepicker -->
<h2 class="demoHeaders">Datepicker</h2>
<input id="datepicker"></input>


$( "#datepicker" ).datepicker({
    inline: true,
    dateFormat: "dd/mm/yy"
});

There is perhaps an overide with the VFP. I will make a test to see.