Getting today's date and different formats for dates in ODK 2.0

Hi Caroline,

In addition to Jeff’s response, I thought I would also add my two cents.

I agree with Jeff’s responses to 1 and 2.

In terms of 3, this can be done without a recompilation by using custom prompt types. A custom prompt type is currently only accessible via the survey that defined it. I have created a custom prompt type named custom_date in the exampleForm within our app-designer repo that uses numbers for all of the drop downs. I’ve attached the updated exampleForm.xlsx (18.6 KB) and the customPromptTypes.js.txt (806 Bytes) files for your reference. The customPromptTypes.js.txt file needs to be renamed to customPromptTypes.js (website would not let me upload a *.js file) and needs to be in the same directory as the exampleForm.xlsx file (i.e. config/tables/exampleForm/forms/exampleForm). As long as the files are named properly and in the right location, you should be able to use the new prompt type without issue. If you do experience problems, don’t hesitate to let me know.

If you wanted the date widget to look the same for every survey without copying the customPromptTypes.js and custom_date prompt to all the surveys, then a change to the APK as Jeff suggests would be more appropriate but also more involved.

Clarice