Show / Hide Table of Contents

    When to Use a Date Time Field

    A date time field is used when the field in the ERP system contains a valid date format.

    Here are some examples of valid date formats with the same example of 27 July 2020 at 8 o’clock 28 minutes.

    • 2020-07-27T08:28:00+00:00
    • 2020-07-27T08:28:00Z
    • 2020-07-27
    • 08:28:00
    • 27/07/2020
    • ...

    When the date(time) field comes to our framework, it will be converted to a .NET datetime object. If it cannot be converted, the framework returns an error.

    Configure a Date and/or Time Picker

    In this section you will learn how to configure a date, time or date and time picker. First you will get information about the object field settings. The second part describes the view field settings.

    Object Field

    If you create a new date time object field or method field, it is possible to change some type specific properties. Of course there are also a lot of generic properties like unique, external name or default value. Refer to common properties for more information about this topic.

    1. Click on the object.
    2. Create a new field.
    3. Change the type from Text to DateTime.

    DateTime Field Configuration

    Kind When Unspecified

    This property will specify the time zone when the system is unable to detect the time zone of the value.

    DateTime Field Configuration Kind When Unspecified

    There are 2 different choices for this property:

    • UTC
    • Local

    Also note that when selecting one of these options, the program assumes the requested dates are in this time zone.

    Interface Formatter

    See Interface formatter for more information about this topic.

    View Field

    A date and time field is displayed in the ADM by a date and/or time control. Depending on the view type there are different properties. The figure below shows an example of what the date picker looks like.

    DateTime Field Date Picker

    Time picker

    As you can see below, the time picker also has an option called Time Selection Interval this is the interval between minutes you can select. This option has an impact on how the time picker is displayed.

    DateTime Field Time Selection Interval

    • Time Selection Interval value is lower than 15:

      As shown below, there will be two different time pickers. The first one to select the hour and the second one to select the minutes.

      DateTime Field Time Pickers

    • Time Selection Interval value is 15 or higher:

      The two time pickers will be merged into one single time picker. You can also see that the interval in minutes between each option is 15. This is because the value of Time Selection Interval is exactly 15 in this example .

      DateTime Field Time Pickers

    Multi Record View

    Property Description
    Show Date If checked the date is displayed in the multi record view.
    Show Time If checked the time is displayed in the multi record view.
    Formatter Definition Refer to View formatter.

    Single Record View

    Property Description
    Show Date If checked the date is displayed in the single record view.
    Show Time If checked the time is displayed in the single record view.
    Formatter Refer to View formatter.
    Events JavaScript events used to interact with the date and/or time picker.

    Create and Update View

    Property Description
    Read Only If checked the control could not be changed by the user.
    Use Data Source Refer to Data Sources.
    Mask Refer to rules and literals. When a mask is used, the layout of the control will be changed to a Kendo masked textbox.
    Show Date If checked a date picker is displayed.
    Show Time If checked a time picker is displayed.
    Time Selection Interval Time interval in minutes between two possible values. If the property is set to 15, you will get the following result in the default English culture: 00:00 00:15 00:30 00:45 01:00
    Events JavaScript events used to interact with the date and/or time picker.
    Formatter Refer to View formatter.

    Troubleshooting

    Incorrect Date Is displayed

    Problem

    I see a date in the ADM displayed as 16-05-2023, my colleague (located in the same time zone) sees it as 17-05-2023.

    Cause

    The Intl.DateTimeFormat().resolvedOptions().timeZone property returns the time zone information of the device that is running the JavaScript code.

    The output of this property can be influenced by the device's settings, including the time zone and daylight saving time settings.

    If the time zone or daylight saving time settings on a device are incorrect, the output of the Intl.DateTimeFormat().resolvedOptions().timeZone property can also be incorrect.

    To ensure that the correct time zone information is returned, it is important to check and adjust the time zone and daylight saving time settings on the device, as well as making sure the correct time zone is set in the operating system.

    Resolution

    In the Windows Date & Time settings, make sure the Time zone is set correctly and Adjust for daylight saving time automatically is toggled on.
    We have seen that you explicitly need to change the Time zone dropdown and change it back, only then, the date was displayed correctly in the web browser.

    Date time settings

    Back to top Copyright © OMETA
    Integrating systems ● Connecting people