Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Date field question

Avatar

Avatar
Level 1
William_wm
Level 1

Likes

0 likes

Total Posts

11 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
William_wm
Level 1

Likes

0 likes

Total Posts

11 posts

Correct Reply

0 solutions
View profile
William_wm
Level 1

08-09-2014

I was wondering if it is possible to have one or multiple date fields change colors or become highlighted based off input from another date field.

What i have is a form that has an oldest possible date field and i want my other date fields on the form to become highlighted if an older date then the oldest possible date field is selected.

Thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

Avatar

Avatar
Coach
MVP
radzmar
MVP

Likes

395 likes

Total Posts

2,686 posts

Correct Reply

491 solutions
Top badges earned
Coach
Ignite 3
Ignite 1
Validate 1
Give Back 50
View profile

Avatar
Coach
MVP
radzmar
MVP

Likes

395 likes

Total Posts

2,686 posts

Correct Reply

491 solutions
Top badges earned
Coach
Ignite 3
Ignite 1
Validate 1
Give Back 50
View profile
radzmar
MVP

08-09-2014

Hi,

this isn't complicated to realize:

Just add a small FormCalc script into the possible oldest date field exit event.

In this example the font color of the Datefield2 will change to red if the selected date is before August the 1st 2014.


var dateFormat = "MM/DD/YYYY"


if (Date2Num($.formattedValue,  dateFormat) lt Date2Num("08/01/2014",  dateFormat) ) then


  DateField2.font.fill.color.value = "255,0,0"


  DateField2.caption.font.fill.color.value = "0,0,0"


else


  DateField2.font.fill.color.value = "0,0,0"


  DateField2.caption.font.fill.color.value = "0,0,0"


endif