Default value for the date
Set the default date value, or time value. Many options exist for supplying the date:
Note 0: Be Specific!
When choosing a format to use, be as specific as your data will allow you to be. A Date object is a date object - it’s inturpreted on the client maching, and it will be “right”. Failing that, the array constructor just passes those values on to a new Date(). Use the string constructor as a last resort - even a simple typo in the string format will cause the defaultValue parser to fail, which drops the defaultValue === Today’s Date, NOW().
Note 1: Don’t Use Epoch!
A small note about epoch - great pains have been made to make DateBox rather timezone agnostic. It rarely has to care, and when it does, it tends to fail pretty much silently. (a/n: This really only crops up for people who observe DST, and then, it will only show up in time modes, or duration modes if you are working with large numbers). That said, if you supply epoch, it is not based on UTC, but the local timezone. If you have already done the math serverside, great. If not, and you absolutly must store your dates this way, a good way to convert back is:
Note 2: Re-using defaultValue
defaultValue is only read when the input element is empty. If you need to change the date, “setTheDate” is much more effective.