Question
Issue with a date field.
I have a date field on my form, called RaffleDate. It is formated as d/m/yyyy. When I open the form the box is blank as I would expect.
I wanted the textbox to display the datevas dddd dd mmmm yyyy
var rawDate = util.scand("mm/dd/yyyy", this.getField("RaffleDate").value); if (rawDate != null) { var dayNames = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]; var monthNames = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]; var formatted = dayNames[rawDate.getDay()] + " " + ("0" + rawDate.getDate()).slice(-2) + " " + monthNames[rawDate.getMonth()] + " " + rawDate.getFullYear(); event.value = formatted; } else { event. Value = ""; }. So I have the code below.
My issue is, when i open the pdf RaffleDate is populated with todays date.
