Fillable form date dropdown without custom text
Copy link to clipboard
Copied
I am wondering if there is a way to create a date field with a dropdown menu without having someone enter the date manually? I have a lot of forms and if the dates are not all formatted the same way it causes a lot of issues for me.
Copy link to clipboard
Copied
What selections do are you trying to put in the dropdown? The current date? Enter the follow script as a mouse down action in the dropdown:
event.target.setItems(["",util.printd("mm/dd/yyyy", new Date())]);
Copy link to clipboard
Copied
Thank you I think that's the best way to do it
Copy link to clipboard
Copied
You can't prevent someone from manually entering a value into a Date text field, if that's what you mean, but if you set it with a specific date pattern it should only accept that pattern, even if entered manually.
Copy link to clipboard
Copied
By "dropdown" do you mean the calendar/date picker that's displayed when you format a field as a date? The field should only accept a date in the format programmed to that field. Are you trying to force someone to use the calendar and prevent them from manual data entry? I developed a PAID tool that puts a button next to a text field that triggers a popup calendar/date picker. If you set the text field to read only, the user will have to use the calendar to enter the date:

