Navigation: Advanced topics > Events > Sample events > Misc
Check if the start date is earlier than the end date
Verify that the start date is earlier than the end date on the Edit page . Use the following code in the Edit page: Before record updated event.
Note: Change red values to match your project.
if (toPHPTime($values["start_date"]) > toPHPTime($values["end_date"]))
$message = "Start date can not be later than End date.";
•About Date Control API
•"Edit as" settings: Date
•AJAX helper object: setMessage()
•Store the date and time when a record is modified
Created with Help+Manual 7 and styled with Premium Pack Version 3 © by EC Software