Date

How can I put the date by dd/mm/yyyy in the following:

a!textField(
label: "Reembolso efectuado",
labelPosition: "ABOVE",
value: today(),
saveInto: ri!reembolso.fechaReembolso,
readOnly: true,
validations: {}
)

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    It'd be more helpful if your subject line could be more than one word, for future reference.

    To give a date a particular formatting in text when using for read-only purposes, you will use the text() function, which accepts a value and a formatting.

    Additionally, if your text field is Read-Only, there is no need to set a "saveInto" as the save will never be executed when the field is read-only.  If you need to set the rule input value to the value "today()", you will need to include this within a saveInto of a component the user interacts with.

Reply
  • 0
    Certified Lead Developer

    It'd be more helpful if your subject line could be more than one word, for future reference.

    To give a date a particular formatting in text when using for read-only purposes, you will use the text() function, which accepts a value and a formatting.

    Additionally, if your text field is Read-Only, there is no need to set a "saveInto" as the save will never be executed when the field is read-only.  If you need to set the rule input value to the value "today()", you will need to include this within a saveInto of a component the user interacts with.

Children