When invalid date is entered into a date field, value not resetting when saving {} to value

Certified Lead Developer
When invalid date is entered into a date field, value not resetting when saving {} to value

Text or non-compliant date entered e.g. ‘abc’ or ‘13/32/9999’
o          Default validation fires correctly
o          When clicking reset button to save {} or ‘’ to the date variable value, the date field remains with the user entered data

Customer wants to know if there is a way to clear this invalid data using a reset button. Now if they click reset nothing happens.

OriginalPostID-259012



  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer
    @charles I think there might be something incorrect in configuration, try following

    Assume the rule input which holds the entered date value is ri!dateValue , so you could something as below

    a!dateField(
    lebel: "Enter Date",
    value: ri!dateValue,
    saveInto: ri!dateValue
    )

    Now for button write as below

    a!buttonWidget(
    label: "Reset",
    saveInto: {
    a!save(ri!dateValue, null)
    }
    )

    Make sure, this button is not a!buttonWidgetSubmit() instead it is a!buttonWidget which doesn't allow form submission by default, as the value for submit parameter is set to false

    Hope this will help you
Reply
  • 0
    Certified Lead Developer
    @charles I think there might be something incorrect in configuration, try following

    Assume the rule input which holds the entered date value is ri!dateValue , so you could something as below

    a!dateField(
    lebel: "Enter Date",
    value: ri!dateValue,
    saveInto: ri!dateValue
    )

    Now for button write as below

    a!buttonWidget(
    label: "Reset",
    saveInto: {
    a!save(ri!dateValue, null)
    }
    )

    Make sure, this button is not a!buttonWidgetSubmit() instead it is a!buttonWidget which doesn't allow form submission by default, as the value for submit parameter is set to false

    Hope this will help you
Children
No Data