Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Date will not display in full format.

Avatar

Level 9

I am using the following code to add user instructions in gray italics. I want to use this on a date object but i am unable to get the date to display as full (Wednesday, March 21, 2012). Is there a way to add this to the script?

Form1.Subform1.CurrentMeetingDate::initialize - (JavaScript, client)
this.execEvent("exit");

this.format.picture.value = "null{'" + this.assist.toolTip.value + "'}";

Form1.Subform1.CurrentMeetingDate::enter - (JavaScript, client)

this.fontColor = "0,0,0";

this.font.posture = "normal";

Form1.Subform1.CurrentMeetingDate::exit - (JavaScript, client)
if (this.isNull)

{

this.fontColor = "153,153,153";
this.caption.font.fill.color.value = "0,0,0";

this.font.posture = "italic";

}

Form1.Subform1.CurrentMeetingDate::prePrint - (JavaScript, client)

this.format.picture.value = "";

Form1.Subform1.CurrentMeetingDate::postPrint - (JavaScript, client)

this.format.picture.value = "null{'" + this.assist.toolTip.value + "'}";

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

Extend the exit script with an else statement:

if (this.isNull) {

          this.fontColor = "153,153,153";

          this.caption.font.fill.color.value = "0,0,0";

          this.font.posture = "italic";

}

else {

          this.format.picture.value = "date.full{}";

}

You might also want to hve an if/else statement for the prePrint and postPrint events.

Hope that helps,

Niall

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

Hi,

Extend the exit script with an else statement:

if (this.isNull) {

          this.fontColor = "153,153,153";

          this.caption.font.fill.color.value = "0,0,0";

          this.font.posture = "italic";

}

else {

          this.format.picture.value = "date.full{}";

}

You might also want to hve an if/else statement for the prePrint and postPrint events.

Hope that helps,

Niall