We have an 8-page wizard form (Public forms with MS sign-in) where there are multiple datetime fields with time enabled. Regardless of restricting to 30 minute intervals in the JavaScript, the form is basing time intervals on when the form is filled out. We're trying to get HH:00 and HH:30 intervals only.
The only code formatting the dates are as such:
fd.field('SubmissionDate').value = new Date();
const dateTime30 = ['EventDate', '2ndEventDate', 'EventAnnouncementDate', 'PresaleStart', 'PresaleEnd', 'PresaleStart2', 'PresaleEnd2', 'PublicSale', 'ReservedPromoStart', 'ReservedPromoEnd', 'ReservedPromoStart2', 'ReservedPromoEnd2', 'GAPromoStart', 'GAPromoEnd', 'GAPromoStart2', 'GAPromoEnd2'];
dateTime30.forEach(timeInterval30);
function timeInterval30(item) {
fd.field(item).widgetOptions = {
interval: 30
};
}
var today = new Date();
var minDate = today.setDate(today.getDate()+7);
const blackoutDates = ['EventAnnouncementDate', 'PresaleStart', 'PresaleEnd', 'PresaleStart2', 'PresaleEnd2', 'PublicSale', 'ReservedPromoStart', 'ReservedPromoEnd', 'ReservedPromoStart2', 'ReservedPromoEnd2', 'GAPromoStart', 'GAPromoEnd', 'GAPromoStart2', 'GAPromoEnd2'];
blackoutDates.forEach(dateBlackoutFunc);
function dateBlackoutFunc(item) {
fd.field(item).widgetOptions = {
min: new Date(minDate),
};
}
First line is for the current date for the submission (only a date field). The 2nd chunk is to limit to 30 minute intervals, and the last block is to limit fields to a minimum of 7 days out from submission date.
Any ideas as to what's causing the minutes to go based on localtime of the submitter?