The Date Calculator iBloc is a custom widget that displays calculated dates and times in any format, in any iRise widget.
Current Version: 1.2.1
Supported iRise Studio Versions: 8.7 – 8.12
Supported Browsers: IE 8.0+, Firefox 3.5+, Safari 4.0+, Chrome 8.0+, iOS Safari, Android (default browser)
Works in iRise iPhone and iPad apps: Yes
What does it do?
- Adds or subtracts years, months, days, hours, minutes and seconds from any date and/or time
- The date/time used as the starting point for the calculation can be:
- The current date/time (now)
- The date/time in any input or calendar widget
- From a clipboard or record action connected to the iBloc via data flow
- Manually entered in the properties panel
- The result can be:
- Expressed as any combination of month, day, year, day of week, hours, minutes, or seconds, in any format
- Shown on the page at the iBloc location as standalone text
- Shown as the value of any input or calendar widget
- Inserted inline into a block of text in a standard text widget
- Submitted to a clipboard or record action via data flow
- Any number of Date Calculator iBlocs may be used on a page
How do I use it?
- Drag the iBloc onto the page.
- Specify the start date for the calculation:
- To use the current date/time (now) as your start date, select “Use Current Date/Time” (checked by default).
- To use the date/time shown in an input or calendar widget, deselect “Use Current Date/Time”, and click the “…” button next to “Start Date/Time Widget” and choose a widget (Note: The result updates dynamically when the value of the input changes).
- To specify a start date/time manually, enter a date in any common format into the “Start Date/Time” property.
- Enter number of years, months, days, hours, minutes and/or seconds to add to the start date (to subtract, enter negative numbers).
- Select a Result Format from the drop down menu in the properties panel (M/d/yyyy is default). See ProTip below for custom formatting.
- Choose where you want to display/send the result date:
- By default, the result date will be displayed on the page at the location of the iBloc. To change the style of the displayed date, you must wrap the iBloc in a section and apply styles to the section, or apply styles to an existing parent container (section, form, table, or page).
- To display the result in an iRise input or calendar widget, click the “…” button next to “Target Input Widget” and choose a widget.
- To display the result inline inside an iRise Text widget, click the “…” button next to “Target Inline Text Widget” and choose a text widget. Then insert the “Inline Replacement String” into your text widget where you want the result to be inserted (*insertDate* is the default).
- The result can be displayed simultaneously in any combination of the above methods. Select the “Hidden” property of the iBloc if you do not want the result shown at the iBloc location.
Tips & Tricks
- You can send data into and out of this iBloc:
- To use a value from Clipboard or a Datasheet as the start date/time, deselect “Use Current Date/Time” and connect a Clipboard or Get Record Action to the iBloc (Start Date/Time Widget must also be empty). Then click the small box to the right of the “Start Date/Time” property and select the label on the data flow you just connected.
- To use values from Clipboard or a Datasheet for your calculation, connect a Clipboard or Get Record action to the iBloc, then click on the small box to the right of the appropriate “Change By…” property, and select the appropriate data flow label.
- To send the result to a Datasheet or Clipboard, place the iBloc inside a Form and connect it via data flow to a Clipboard or record action widget. Then click on the data flow label and in the properties panel, select “Result (default)” under “Choose which property to send:”.
- To create your own custom format for your result, select “Custom” for Result Format, and enter your custom format string in the the “Custom Result Format” property (format string may be sent from a data flow — see above). Click here for a complete list of format specifier codes (opens in new tab/window).
- To have a date or message displayed when the input widget you’re using as a start date is empty, enter the default value in the “Result (default)” property field at the bottom of the properties panel.