Restricting selection of Second Saturday of the Month & Sunday in Month in calender

Hi @Kal_Lam

Can you Please Guide, that how can we restrict selection of Second Saturday of the Month & Sunday in Month in calendar.

Cheers !

Neeraj

Not directly in the calendar widget, but you can define a corresponding constraint (and add a hint or guidance_hint to the question).

1 Like

Can you pl guide for that constraint and hint

@caneeraj, maybe you could do it as outlined below (to restrict the second Saturday):

In the survey tab of your XLSForm:

Data entry screen as seen in Enketo:

Data entry screen as seen in Enketo:

Reference XLSForm:

Date.xlsx (16.7 KB)

You could follow this post to restrict the Sunday that has already been discussed previously:

1 Like

Thanks a Lot @Kal_Lam you solved our big issue and saved us from incorrect data capturing.

1 Like

Hint: The solution will only show a note (for any date), but still allow to enter and submit invalid dates.
If you want to avoid this you would need to put ithe if clause as a constraint to the initial date field. (Furthermore you might directly integrate the calculations in the if clause).

You could also add a hint text for the user which will appear below the question label, to guide got valid entry. See Help Center articles Overview of All Formbuilder Functions — KoboToolbox documentation (and Using the Question Options — KoboToolbox documentation). In XLSForm you put this text in a column, named hint (or guidance_hint)

1 Like

@caneeraj, maybe add this small constraint in the relevant column that should do the trick:

In the survey tab of your XLSForm:

Data entry screen as seen in Enketo:

Reference XLSForm:

Date.xlsx (16.7 KB)