Hey all, Does anyone happen to have any update or working on-form workaroun

Certified Lead Developer
Hey all,
Does anyone happen to have any update or working on-form workarounds to the current bug with the DateTime field?

In short, if you have a dateTime field and ONLY the date is entered, upon submission no value is saved into the variable. The problem is, if the field has only the date entered, it bypasses the "required" conditional validation and does not validate at all. Therefore we have forms where a dateTime is required (and process-critical), being submitted by users who forget to enter a time and therefore promoting a value of "null", which proceeds to cause pretty severe issues in the inner-workings of our subsequent processing. Previously the validation worked so we didn't have this issue, and we'd never built post-form doublechecks to ensure valid dates had been entered (because on-form validations, etc).

I believe an issue had been raised about this previously, but I've never heard any update, and the issue has persisted into 7.11.

DateTime Bug.sail

OriginalPostID-180013

OriginalPostID-180013

  Discussion posts and replies are publicly visible

Parents
  • Mike,
    I got this response from the support ticket I created for this issue:

    The workaround is:

    - Preserve "required:true"
    - Add a custom validation too as seen below

    Example

    a!dateTimeField(
    label: "Registration Date and Time",
    labelPosition: "ABOVE",
    saveInto: ri!myDateTime,
    value:ri!myDateTime,
    required: true,
    validations:if(isnull(ri!myDateTime), "Registration date and time is required", null)
    )
Reply
  • Mike,
    I got this response from the support ticket I created for this issue:

    The workaround is:

    - Preserve "required:true"
    - Add a custom validation too as seen below

    Example

    a!dateTimeField(
    label: "Registration Date and Time",
    labelPosition: "ABOVE",
    saveInto: ri!myDateTime,
    value:ri!myDateTime,
    required: true,
    validations:if(isnull(ri!myDateTime), "Registration date and time is required", null)
    )
Children
No Data