Application Express User's Guide > Building an Application > Creating Items > Populating an Alternative D...
Populating an Alternative Date Picker Format |
Previous |
Next |
If you need to create a Date Picker item, but the format you need does not appear in the Display As list, select Date Picker (use application format mask). When an application uses this type of date picker, the Application Express engine derives the date format from an item named PICK_DATE_FORMAT_MASK
. You can populate this item in two ways:
By defining an application substitution string named PICK_DATE_FORMAT_MASK
By creating an application-level item named PICK_DATE_FORMAT_MASK
One approach to populating PICK_DATE_FORMAT_MASK
is to create an application substitution string. You define application-level substitution strings on the Edit Application Attributes page. Remember that an application-level substitution string is a static value and cannot be altered at run time.
To define a new application substitution string named PICK_DATE_FORMAT_MASK
:
On the Database Home Page, click the Application Builder icon.
Select an application.
Application Builder appears.
Click the Edit Attributes icon.
Click Edit Standard Attributes.
Scroll down to Static Substitution Strings.
Create a new static substitution string named PICK_DATE_FORMAT_MASK
:
In Substitution String, enter the name PICK_DATE_FORMAT_MASK
.
In Substitution Value, enter a value for your date format (for example, Month DD, YYYY
).
Another approach to populating PICK_DATE_FORMAT_MASK
is to create an application-level item named PICK_DATE_FORMAT_MASK
. This approach enables you to control any items rendered as Date Picker (use application format mask) by simply setting the value of this item. Plus, you can set the value of PICK_DATE_FORMAT_MASK
using a computation from anywhere within your application.
If you want to provide the user with a list of date formats as preferences, you will need to create an application-level item named PICK_DATE_FORMAT_MASK
and then use a computation to set the value of this item based upon the user's selection.