0
votes

I am new to the environment and need help writing a validation statement in APEX.

I have a Start Date and End Date field on a page with a Date Picker Type.

The End Date validation has already been set ( end date must be equal to or greater than start date )

Now I need to implement this validation for start date:

  • User should be able to choose either the current date (today) or a future date.

Is there a way to disable previous days on Apex? Or would I need to write a validation statement? If so, what validation statement could I use?

1

1 Answers

1
votes

Check out the settings for the date picker, specifically the minimum date.

enter image description here

Use the help to work out exactly what you need. APEX will then handle the validations for you.