Date and Time Variables

In this tutorial, we will learn how to utilise two variable types, allowing users to pick a date and time.

In our example, we will link these variables to fields within our template.

adobe

  1. 1. To begin, click the Variables tab within the Invent plugin in InDesign

    To begin, click the Variables tab within the Invent plugin in InDesign
  2. 2. Click Add Variable

    Click Add Variable
  3. 3. Select a Date Variable

    Select a Date Variable
  4. 4. Enter a variable name

    Enter a variable name
  5. 5. Specify a default date value for this variable

    This value can either be chosen as a relative date (a quantity of days from the current date) or as a direct selection of one date.

    This is the value that will be shown by default when the product first loads within MegaEdit.

    Specify a default date value for this variable
  6. 6. Specify a date format

    The date format can be switched between two preset values (UK or US format), or, custom formatting can be specified.

    Specify a date format
  7. 7. Optionally, set constraints on the minimum and maximum date

    As with the default value, these are linked to the Relative Date checkbox.

    This will change the selection between a date relative to today, or a fixed date picker.

    Optionally, set constraints on the minimum and maximum date
  8. 8. Specify days which are selectable within the calendar picker

    Deselected days will be unavailable for selection by default.

    Specify days which are selectable within the calendar picker
  9. 9. Click Save to confirm the variable

    Click Save to confirm the variable
  10. 10. Next, we will create a time picker

    The methodology is very similar to that of the date picker.

  11. 11. Click Add Variable

    Click Add Variable
  12. 12. Select a Time variable

    Select a Time variable
  13. 13. Enter a variable name

    Enter a variable name
  14. 14. Specify a default time and a time format

    The default time will be displayed when the product first loads in MegaEdit.

    The format can be switched between a 24 hour format, or an AM/PM format.

    Specify a default time and a time format
  15. 15. Optionally, set constraints on the earliest and latest times available for selection

    Optionally, set constraints on the earliest and latest times available for selection
  16. 16. Click Save

    Click Save
  17. 17. Next, we will link our two new variables to text frames on our template

  18. 18. Select a text frame to populate

    Select a text frame to populate
  19. 19. Enable the text frame within the properties tab to make it dynamic

    Enable the text frame within the properties tab to make it dynamic
  20. 20. Map the relevant variable to the text frame

    Map the relevant variable to the text frame
  21. 21. Select a second text frame

    Select a second text frame
  22. 22. Enable the frame and map the relevant variable

    Enable the frame and map the relevant variable
  23. 23. Export the template as a MEX file

    Export the template as a MEX file
  24. 24. Import the MEX file in to your MegaEdit product

    Import the MEX file in to your MegaEdit product
  25. 25. Launch the MegaEdit editor for this product

    Launch the MegaEdit editor for this product
  26. 26. Date and Time pickers are now available on the MegaEdit form and are linked to the text frames on your template

    Date and Time pickers are now available on the MegaEdit form and are linked to the text frames on your template