Please enable JavaScript to view this site.

Navigation: Advanced topics > Events > Sample events > Misc

PHPrunner32x32     PHPRunner manual


Check if the start date is earlier than the end date

Scroll Prev Next More

 

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.";
  return false;
}
else
{
  return true;
}

See also:

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