Hi Amos.
I fully understand your code. But let me ask this:
Code: Select allDefault: false
See http://momentjs.com/docs/#/displaying/format/ for valid datetime formats. If only the date is included in the format then the time picker will not be displayed.
Examples:
dddd, MMMM Do YYYY, h:mm:ss a >> "Sunday, February 14th 2010, 3:25:50 pm"
ddd, hA >> "Sun, 3PM"
YYYY MM DD >> "Valid date"
The above is from the help text for the format string in the date/time field. I used YYYY-MM-DD. Why would the date picker ignore my format string and add any time details in there at all?
And more importantly, let me ask one more question. The slogan of Processmaker is "Workflow Simplified". I want a date. I want the date to go into a template. Why should I need to write code to strip out the time that I never wanted in the field in the first place?
No offence, but your code is a workaround, not a solution to the oversight in how the date picker does something totally unexpected.