3

I have a date field and time, and want to take this 5 minute interval in the select minutes, I want to be in sequence, example: 00,01,02,03,04,05,...55,56,57,58,59.

How can this be done?

1 Answer 1

0

If you're using jQuery, you can add the following piece of code (on DOM ready) into the content editor webpart inside the new/edit form.

$("select[id$='DateTimeFieldDateMinutes']").each(function() {
 var ddMinutes = $(this);
 ddMinutes.children().remove(); //Remove options 

 for(var i=0; i<60; i++) {
    if (i < 10){
         i = '0' + i;
    }
    $('<option />', {value: i, text: i}).appendTo(ddMinutes);
 }
});

Sharepoint's minute dropdown field has an id ending with DateTimeFieldDateMinutes.

3
  • Thanks for the help, but it worked this your idea, it only displays on the field but not saved in columns. I had another solution, not used selects SharePoint, made ​​by JQuery and changed by it and it worked.
    – Renanfdo
    Mar 27, 2014 at 14:45
  • @Renanfdo, could you please post your solution?
    – grisha
    Nov 28, 2014 at 17:16
  • 1
    @grisha Create Dynamically 0 option field to 59 in a desirable list. After creating the item by css or javascript enter the select next to the date of the input (without the time options and minute), create a workflow created and changed. Within the workflow you add or set the time and the minute that the person selected in the field of time that you created.
    – Renanfdo
    Dec 3, 2014 at 15:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.