Interacting with durations
You can use the DurationSelector server control to allow the user to specify a duration, in days, hours, and minutes, on a configuration page. The interaction for the DurationSelector control is different than most of the other server controls and user controls provided by Nintex Workflow 2013.
Registering the control
The following Register directive registers all server controls, including the DurationSelector control, for use on a configuration page.
<%@ Register TagPrefix="Nintex" Namespace="Nintex.Workflow.ServerControls" Assembly="Nintex.Workflow.ServerControls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=913f6bae0ca5ae12" %>
Declaring the control
The following example illustrates how to add a DurationSelector control to a configuration property.
<Nintex:DurationSelector runat="server" id="durationSelector1" />
Implementing the control
Before setting a value for the DurationSelector control, the control resembles the following example:
When the link for the DurationSelector control is clicked, the control displays a window, in which the duration can be specified, as shown in the following example:
After the DurationSelector control has been set to a valid duration value, the link for the control now presents a natural language description of the duration, as shown in the following example:
The appearance of the control cannot be directly adjusted by using control properties. However, you can implement the SetDurationPickerPosition JavaScript function to override the default size and position of the duration window for the control. For more information, see SetDurationPickerPosition.
Note: Only one instance of a DurationSelector control can be included on a configuration page.
JavaScript functions
You can use the JavaScript functions included with the DurationSelector control to get and set the duration value, or to override the default display characteristics of the control. For more information about the JavaScript functions included with the DurationSelector user control, see DurationSelector.
See Also
Concepts
Operations
Working with configuration pages