forms date/time control with 1 minute period


Badge +4

Hello all,

Is there a way to change the date/time control so that the minutes filed show all minutes not only from 5 to 5?

thank you,

adriana


6 replies

Userlevel 6
Badge +16

Adriana:

Como estas?

Currently, you only can set minutes from 5 to 5. Perhaps you could write some JavaScript so as to change it, but should be tested also on the edit view.

Badge +4

Hello Fernando,

I thought so too.. but i was hoping for some sort of settings.

Thanks

adriana

Userlevel 6
Badge +16

No problem, please set it as answered

Badge +6

I added a list template of "notable events" you can import. Then I attached a form where we added javascript to it and the 24 hour gets converted properly.

If you are curious, the JavaScript is located in settings>Custom JavaScript

function funcResolve()
{
var fullDate = new Date();
var realMonth = fullDate.getMonth() + 1;
var hours = ("0" + fullDate.getHours()).slice(-2);
var minutes = ("0" + fullDate.getMinutes()).slice(-2);
var currentDate =  realMonth + "/" + fullDate.getDate() + "/" + fullDate.getFullYear();
if (hours   < 10) { hours   = "0" + hours;   }
var cTime = hours + ":" + minutes;
// Set the date field
NWF$('#' + fldResDate).val(currentDate);
// Set the time (hours + minutes) fields
NWF$('#' + fldResTime).val(cTime);
NWF$('#' + chkComplete).click();
}

Badge +4

thank you so  much. i will for sure try this.

Badge +6

let me know if it works for you

Reply