Community Health Toolkit

Displaying a default date on the calendar

I have a date field in my XLSForm and I would like to display a default value. I have tried to add the following under the defaults column but it does not display anything.

2020-10-15 
date('2020-10-15')
2 Likes

I don’t think we have this documented anywhere and https://xlsform.org/en/ doesn’t really seem to either.

However, I found the mention of using today() in the calculation field and tried your date('2020-10-15') in the calculation field. It seems to set that as the default date.

3 Likes

What I noticed is that even though it sets it as a default value, you can’t override it even if you select a new date from calendar.

1 Like

Can you provide the report and details(what version of the app, what browser, user type, etc…) about your app instance? I tried it just now and it is updating.

1 Like

CHT version 3.9.1
Chrome Browser
CHV user

1 Like