Copy link to clipboard
Copied
Hi everybody,
I want to use cfinput type=datefield and i can't obtain dates in french format.
I have <cfset Locale=setLocale("French (standard)")> in my application.cfm
Here my code :
<cfinput type="datefield" name="DateCloture" validateat="onSubmit" validate="eurodate"
daynames="Di,Lu,Ma,Me,Je,Ve,Sa" monthnames="Janvier,Février,Mars,Avril,Mai,Juin,Juillet,Août,Septembre,Octobre,Novembre,Décembre">
When i select 3 april 2013 in the calendar it gives me 04/03/2013 and in the database i get 4 march 2013. Of course i tried to use LSDateFormat(MaDate,"dd/mm/yyyy") but without success.
Is it possible to have french dates using datefield and How ?
CF 8 on Windows 2003 server.
Thanks in advance for your answer and sorry for my poor english.
Jean-Jacques.
_____________________________________________________________________________________________________________
Bonjour à tous,
J'essaie en vain d'utiliser cfinput type=datefield avec des dates au format français.
J'ai mis <cfset Locale=setLocale("French (standard)")> dans le fichier application.cfm
Voilà mon code :
<cfinput type="datefield" name="DateCloture" validateat="onSubmit" validate="eurodate"
daynames="Di,Lu,Ma,Me,Je,Ve,Sa" monthnames="Janvier,Février,Mars,Avril,Mai,Juin,Juillet,Août,Septembre,Octobre,Novembre,Décembre">
Quand je sélectionne 3 avril 2013 dans le calendrier l'affichage est 04/03/2013 et la date sauvegardée est le 4 mars 2013. J'ai bien sûr essayé d'utiliser LSDateFormat(MaDate,"dd/mm/yyyy") sans succès.
Est-il possible d'utiliser datefield et de conserver la gestion des dates françaises et si oui comment ?
CF 8 sur Windows 2003 serveur.
D'avance merci de votre aide,
Jean-Jacques.
Copy link to clipboard
Copied
Not sure if this is going to help, but have you thought of using <select> tags for the days and months and you insert it into the database the way you want it?
Give s you more control on how you display it.
Copy link to clipboard
Copied
Hi cf_junkie,
Thank you for your answer.
I don't use 3 <select> for days, months and years because 1) it needs to manage invalid dates 2) it's less convenient for users then datefield.
Anyway thank you and regards,
Jean-Jacques
Copy link to clipboard
Copied
Hi everybody,
Apologize for this first and last up i will do with this topic.
Can anybody from Adobe or strong cf specialist tell me if i must abandon all hope of using datefield with international (euro) dates ?
Thanks in advance and have a nice day,
Jean-Jacques.