-
pgctreasdisbursementsAsked on May 10, 2024 at 12:01 AM
-
Mary_Ed JotForm SupportReplied on May 10, 2024 at 4:50 AM
Hello Pgctreasdisbursements,
Thanks for reaching out to Jotform Support and we’re sorry you’re having trouble with this. I did some tests and it's not possible to show the day on the Date Picker field. But here's a workaround you could do:
1. Add a Form Calculation Widget to your form and a Short Text field.
- The Form Calculation Widget will be used to pull the day of the selected date. Hide this widget so that it is not displayed and causes confusion to your form respondents.
- The Short Text field will be used to display the complete text for the day using conditional logic.
2. Set up the formula inside your Form Calculation Widget. Add the math function, dateString().
3. Add the Date Picker field inside the dateString() math function and click the Save button.
It converts the Date value to a date string with the first 3 letters of the day and month. Take a look at the screenshot below to see my results:
4. Add several Update/Calculate Field conditional logic to insert the full text of the day into the Short Text field we added earlier based on the calculation value of the Form Calculation Widget. You can check this guide for more details on this type of condition where you can insert a certain text into a field based on another field's value. Here's what the condition would look like:
The condition will just insert the full "Monday" text into the short text field if the Form Calculation widget contains the word/value "Mon" since the dateString() math function only includes the first 3 letters of the day. Please note that you need to add this condition for all the days of the week.
5. Add a Substring Widget to get the Date format e.g. "Jan 29, 2024", from the Form Calculation Widget.
6. Get the Field ID of the Form Calculation Widget to pull the Date, and set up the Substring Start and End.
Check out the screencast below to see my results:
Give it a try and reach out again if you have any other questions.