Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Help with Date Field properties

Avatar

Former Community Member
I have a problem setting properties for date field. I want date in mm/dd/yy format, that i am able to but I want something like this. When someone enters date as just numbers like 080708, it should automatically make it as 08/07/08.

I tried doing some setting but couldn't find any help appreciated.



thanks
3 Replies

Avatar

Former Community Member
You will need to adjust the validation patterns in the Value tab on the object palette. There are four patterns that you can play with (Display, Edit, Validation and Data). Each pattern will affect the field data at different times. To get access to the patterns click on the Validation Pattern...button. A new dialog will open up with the 4 patterns available to you. The display pattern is how the data will be shown on screen. The edit pattern is how the user will enter the data, the Validation pattern is how the field will be validated and the Data pattern is how the data will appear in the saved XML.



In your case you will want to set a disply pattern of DD/MM/YY and an edit pattern of DDMMYY. This will allow the user to enter 080708 or 08/07/08 and it will display 08/07/08 all of the time.



Hope that helps

Avatar

Former Community Member
Thanks a tons Paul That worked

one more question one place i am trying to print the current date by default i did the setting as calculated script and selected current date/time option but it doesn't show me anything

Avatar

Former Community Member
sorry i must say selected current date/time in runtime script option.