When using the datasources feature with a SharePoint list containing Date/time columns you may notice that the date in the drop-down menu may not match what you see when viewing the list in SharePoint. This happens because SharePoint stores all date/time fields in UTC but displays the date in the timezone that is configured in the SharePoint sites settings. Team Forms on the other hand receives this UTC date form SharePoint and does not automatically convert this to any specific timezone. You will need to do this manually using the steps below.
Drag and drop the SharePoint data component into your form and link it to the SharePoint list containing the date column
Under the data tab update the "Label Property" to "π οΈ Custom". This will allow us customise what appears in each item of the drop-down menu
An "Item Template" property will appear that will allow you to add custom HTML to specific what should appear in the drop down menu. We will use curly bracket syntax to inject Javascript in the html to convert the UTC date to the users local time zone using the expression below.
<span>{{ moment(item.DateCol).format('DD-MM-YYYY HH:mm') }}</span>