-
MRtest_lihDemandé le 9 août 2023 à 07:58
Bonjour,
j'ai plusieurs questions avec une date a sélectionner. Je ne souhaite collecter que le mois et l'année, le jour n'étant pas pertinent.
Comment puis-je avoir le format MM/AAAA et pas DD/MM/AAAA?
Merci d'avance
-
Marco Jotform SupportRépondu le 9 août 2023 à 14:06
Hi Maurane,
Thanks for reaching out to Jotform Support. Unfortunately, our French Support agents are busy helping other Jotform users at the moment. I'll try to help you in English using Google Translate, but you can reply in whichever language you feel comfortable using. Or, if you'd rather have support in French, let us know and we can have them do that. But, keep in mind that you'd have to wait until they're available again.
Now, let me help you with your question. To get only the month and year, you'll have to use a specific widget, the DatePicker Year Month.
Give it a try and let us know if you need any other help.
-
MRtest_lihRépondu le 10 août 2023 à 04:42
Many thanks.
Is there any option for customization? e.g. min date and max date, translations (the form is available in En, FR, DE, PT)?
-
MRtest_lihRépondu le 10 août 2023 à 04:43
Also I would like to change the colour (from gray to #293E84)
-
Marco Jotform SupportRépondu le 11 août 2023 à 10:51
Hi Maurane,
Unfortunately the widget doesn't allow you to set a min/max date, nor to translate it in different languages.
An alternative, more flexible for your needs, may be to add two dropdown menu fields: one for the months, and one for the years, like shown below:
I'd suggest you to proceed in this way:
- Add a Dropdown field from the Form Elements list on the left side of the Form Builder.
- Once added to the form, click on it and click on the Gear icon to access the field settings.
- From the Dropdown Properties panel that appears on the right, click on the Options tab.
- From the Options textbox, specify the list of the months, one per line.
Now, you need to create one more Dropdown field for the years.
- Add a Dropdown field from the Form Elements list on the left side of the Form Builder.
- Once added to the form, click on it and click on the Gear icon to access the field settings.
- From the Dropdown Properties panel that appears on the right, click on the Options tab.
- From the Predefined Options menu, select Last 100 Years, to get a list of the years automatically generated.
Now, after you added the desired languages to your form, you just need to make sure that the list of months will be shown in the correct language, according to the form's language. So you need to translate the months in Spanish. Let me show you how:
- From the Form Builder, click on the Settings tab on the orange bar at the top.
- You'll see the Form Settings page. Scroll down until you see Translations, and click on the Edit button on the right.
- You'll see the additional languages you applied to your form. Hover your mouse over the language element and click on the pencil icon.
- Add the translation for each month, and that's it.
Your form will work in this way:
You can clone and test my simple demo form, if you'd like to inspect it deeper.
Let us know if this solution may work for your.