Calendar Template Frequently Asked Questions

This FAQ answers Calendar Template questions. If you have a question that isn't listed here, feel free to ask your question in Calendar Template forum or contact technical support directly.

How to install Calendar Template?

  1. Download Calendar Template using the link in your registration email.
  2. Start PHPRunner or ASPRunner.NET. On the Start screen, open the New Project tab and click Manage templates.
  3. Click Import and select the downloaded Calendar Template package.
  4. Return to the welcome page, select Calendar, and click Next.
  5. Connect to the database where the Calendar tables should be created. You can create a new database or use an existing database.
  6. Build and test the application, then deploy it to your web server.

See the official template instructions for PHPRunner or ASPRunner.NET.

Back to top

Calendar Template v4.1 system requirements

PHPRunner

  • PHPRunner 11.3 or better
  • MS Access, SQL Server, MySQL, PostgreSQL or Oracle database
  • PHP 5.4-5.6, PHP 7.0-7.4, or PHP 8.0-8.5

ASPRunner.NET

  • ASPRunner.NET 11.3 or better
  • MS Access, SQL Server, MySQL, PostgreSQL or Oracle database

Back to top

How to display data from different table in calendar format?

You can replace the built-in calcalendar table with your own table. To display data from your own table you need to do the following:

  1. Add your own table to the project on 'Datasource tables' screen
  2. Modify AfterAppInit for this purpose

    PHPRunner

    In AfterAppInit event add the following code after calendar_init(); line:

    ASPRunner.NET

    In AfterAppInit event add the following code after CommonFunctions.calendar_init(); line:
  3. Mandatory fields: ID (key column), DateField (or DateTime), Subject. If one of the required fields is missing error message will be thrown in runtime.
  4. Fields Recurrence, EndDate, Period should be specified together if you want to display recurrent events.
  5. TimeField will work without EndTime specified. If EndTime is specified, TimeField must be specified as well.
  6. You have two options to store date/time values. Date and time can be stored separately in two different fields or you can use a single datetime field for this purpose

Can we change the color of calendar entries?

Add the following code to Custom CSS section. Modify color according to your preferences:

What are Start Time and End Time settings under 'Global Settings'?

These settings control what time you can select while creating or editing calendar entries. It will also filter out entries that are outside of the specified time range. This option is useful to limit calendar entries to business hours only.

How to schedule Calendar background tasks?

Calendar uses a scheduled job for event notifications and ongoing Google Calendar synchronization. Configure your hosting control panel, Windows Task Scheduler, or another server scheduler to run the generated Calendar scheduled-job endpoint at the interval appropriate for your application.

The schedule controls how quickly background changes are processed. For example, an hourly schedule may delay a notification or synchronization until the next hourly run.

Schedule the appropriate URL for the generated application:

  • PHPRunner: https://your-domain/calendar/cron.php
  • ASPRunner.NET: https://your-domain/calendar/cron

Replace your-domain/calendar with the actual address where the generated Calendar application is deployed.

How to change the way event title is displayed

In PHPRunner, proceed to Editor -> Custom Files and open calendar_custom.php. In ASPRunner.NET, open calendar_custom.cs. There will be a function named calendar_setTitle(). You can modify that function's code to change the way the title is displayed. Here is the default code.

PHPRunner:

ASPRunner.NET:

And a quick example. Here is how it looks by default.

Now we do not want to display anything when event title is empty and in other case we want to prefix the title with the name of the user who created this event. Something like this:

And here is the PHP code that does the job:

Back to top

How to set up Google Calendar synchronization?

Calendar Template v4.1 can synchronize events in both directions between the application and a Google Workspace calendar. This integration uses a Google service account with domain-wide delegation. It requires a Google Workspace account managed by an organization; a personal Gmail account cannot be used with this synchronization method.

  1. In Google Cloud, select or create a project and enable the Google Calendar API.
  2. Create a service account, enable domain-wide delegation, and create a JSON key for that service account.
  3. In the Google Workspace Admin console, authorize the service account's client ID for the Google Calendar scope https://www.googleapis.com/auth/calendar. This step requires a Google Workspace super administrator.
  4. Rename the downloaded key file to serviceaccount.json. Add it to the project as a custom file in the application root, then rebuild and deploy the application. Keep this credential private and do not expose it as a public download.
  5. Sign in to the Calendar application as an administrator. Open Global Settings -> Google settings, enter the corporate Google Workspace email address whose calendar should be synchronized, and save the settings.
  6. Configure a scheduled job so synchronization continues when nobody is signing in or changing settings. Schedule https://your-domain/calendar/cron.php for PHPRunner or https://your-domain/calendar/cron for ASPRunner.NET, replacing the example domain and folder with your deployed Calendar application URL.

Synchronization runs in three situations:

  • when a user signs in after a corporate Google Workspace email has been configured;
  • immediately after the Google Workspace email is added or changed in Google settings;
  • whenever the scheduled job runs.

If a personal Gmail address is entered instead of an account from the configured Google Workspace domain, synchronization does not run.

Google's current setup references are Create access credentials and Delegate domain-wide authority to a service account.

Back to top