Skip to main content
luizb1735
July 29, 2024
Question

DateField Mask

  • July 29, 2024
  • 6 replies
  • 0 views

I need some help with datefield masks, i'm trying to input the date 15062000 and i need that the text be corrected to 15/06/2000.
How can I do that?

Keep using dateField

6 replies

July 30, 2024

There is no auto correct option as of now, can you please elaborate your requirement?

July 30, 2024

AFAIK, this is not possible using datefield as of now.

stefanhelzle0001
Brainy
July 30, 2024

You could do that using a text field. Then parse the entered values into a date inside the saveInto.

stewart.burchell
July 30, 2024

So as [mention:a11f77a729fb4db2af76b09948583328:e9ed411860ed4f2ba0265705b8793d05] says you could use a text field, apply the necessary validations, and then construct the date by extracting the day/month/year components and concatenating them into the relevant format before saving into the target variable.

But I have to ask why you feel it necessary to go to all that trouble. The data field provides all of the necessary validation, it'll adjust accordingly to different locales (e.g. mm/dd/yyyy for the US, dd/mm/yyyy for the UK), has a date picker, all of which costs the user two extra key strokes to include the "/" separator.

July 30, 2024

Yes, we should use the Date field.

Also, it would be good if Appian provided this masking capability in future releases (automatically formatting date). This will increase data entry speed.

prasantap0900
August 7, 2024

a!localVariables(
  local!a:02022024,
 {
   a!textField(
  label: "Date",
  value: text(local!a, "dd/mm/yyyy")
)
}
)

You can try like that but not a good practice.