Numerical/Decimal Value | XM Community
Skip to main content

Hi all,
I have a question on my survey scale that asks about time. I've put questions as a form field as we need respondents to mention the exact time. We've requested them to adapt a 24-hour time scale i.e. 23:00 instead of 11 pm. In the edit validation, I've selected numerical values only. However, it doesn't allow decimals. Any idea how to get this into a 24-hour time scale? Thanks so much.

Charmi I'd recommend using Flatpickr for this.
Below is the JavaScript you'd need to add.
To the header:
https://cdn.jsdelivr.net/npm/flatpickr/dist/flatpickr.min.css" rel="stylesheet" />">https://cdn.jsdelivr.net/npm/flatpickr">
To the question:

{
enableTime: true,
noCalendar: true,
dateFormat: "H:i",
time_24hr: true
}


Leave a Reply