cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to Customize date control in nintex form

Hi Every one

I have situation like this.

in absence Request workflow i have  different type of request Like hourly - daily and ... 

I want to create and customize form like this:

if user select the hourly type the start date and end date (date & Time field) show as date and time. otherwise it just show date field.

date control have property call DATE Only. i was write a expression like this:

fn-if(leavetype == 'hourly','No','Yes')

this formula work perfect if i set in calculation field control. but in date only Property it's just evaluate as Yes.

Please Help Me!!

THX

Labels: (2)
Tags (1)
Reply
4 Replies
Not applicable

Re: How to Customize date control in nintex form

Any body can help?

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: How to Customize date control in nintex form

Expression for 'Date only' of Date/Time control will be evaluated once at the time the form is loaded. Formula in Calculated Value control will be evaluated at runtime to reflect the current values entered in named controls.

So You need to use JavaScript to show/hide part of Date/Time control.

Accept as Solution Reply
Not applicable

Re: How to Customize date control in nintex form

thanks ‌ . i am not familiar with java script too much. would you give more instruction?

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: How to Customize date control in nintex form

here is a quick and dirty solution using a yes/no control to show/hide time:

Control settings:

JavaScript:

NWF$(document).ready(function () {
    var yes_no = NWF$(".yes_no_time").find('input'); /* Control CSS class */
    yes_no.change(function () {
        if (yes_no.prop("checked") == true) {
            NWF$(".date_time .nf-datepicker-select").hide();
        } else {
            NWF$(".date_time .nf-datepicker-select").show();
        }
    });
});
Accept as Solution Reply