Display a Default Text in a Date Field
I would like my field to display the text "enter date" when nothing is displayed. When a user enters a date then the field will verify it is in the following format mm/dd/yyyy. So if the user enters 6/2 then I would like the field to auto format to 06/02/2022.
I understand this could be accomplished using the Format option, but if a date format is set then I cannot set a Default Value option.
In a different field, I have the following Custom Format Script for a number field. Is there a way I can make this work for my date field.
if (!event.value) {
event.value = "10xxx";
event.target.display = display.noPrint;
} else {
event.target.display = display.visible;
}
I am okay with a user typing in a date as 6/2 or 6/2/22 or 6/2/2022, but the end result should be a format as mm/dd/yyyy.
