cancel
Showing results for 
Search instead for 
Did you mean: 
Workflow Hero

Set Minutes in date picker

Hi everyone,

How can i set the date picker to any date, any hour and only 00 or 30 (zero minutes or 30 minutes) ?

Reply
5 Replies
Workflow Hero

Re: Set Minutes in date picker

There may be a solution via jquery code but as I'm not a developer last time I needed such functionality I helped me with the following approach:

  • have a date/time column in your list
  • just put a date picker not connected to your column onto the form.
  • put a choice field for hours 0 to 23 next to it
  • put a choice field for minutes 0 and 30 next to the hour choice field

Now the magic is to combine those fragments to the full date and safe it to your column.

You can do so by having a formula field on your form that combines everything to a date and is connected to your column or read those fragments within a workflow and save it.

Would that be helpful?

Best regards

Enrico

Accept as Solution Reply
Workflow Hero

Re: Set Minutes in date picker

with jQuery you could do it eg. following way.

configure a class for datetime control, eg. OnlyHalfHour

add following code to form's custom javascript

NWF.FormFiller.Events.RegisterAfterReady(function (){
    NWF$('.OnlyHalfHour select.nf-datepicker-select:not(.nf-hours) :not(option[value="00"], option[value="30"])').remove(); 
})
Accept as Solution Reply
Workflow Hero

Re: Set Minutes in date picker

Thank you Marian. We are going to try this solution

Accept as Solution Reply
Workflow Hero

Re: Set Minutes in date picker

Hello, Marian. I'm trying use your solution , but I got problem that is i can't select hour (nothing in the dropdown ) .

so what I miss ?

Best regards!

Jayson

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Set Minutes in date picker

I'm not sure ....

have you retyped the code exactly as provided above (with all spaces, comas, etc.)?

have you configured a class for date control?

were you applying the script on minute's or hour's dropdown?

any errors on developer console?

what platform and version are you on?

0 Kudos
Accept as Solution Reply