Please enable JavaScript to view this site.

Navigation: Advanced topics > Events > Sample events > Misc

Check if the start date is ealier 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.

 

 

 

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