Vote for this Product at ClarionShop
 
Buy now at ClarionShop
Version Gold

www.capesoft.com
Updated
Tuesday 09 January 2007
     
 


Learn Replicate
Learn Replicate
Replicate Examples
Useful Tips
Replicate Objects
Support - FAQ's and Troubleshooting
History
Jumpstart Tutorial
Templates
Examples
Useful Tips
Object Docs
Version History


Main HotDates Documentation

 
Contents
  Introduction  
Features
Adding HotDates to your Application [Important Reading]
Useful Tips (How do I ...?) [Suggested Reading] 
Examples
What the Users are saying
License & Copyright
Installation
Version History [Important for existing users]

Back to top for other docs (Reference and Support)

     

Introduction

Have you ever wanted to drop your date information onto a calendar? Leave, birthdays, order due dates, etc look so much more comprehensive on a calendar than in a list box. Or what about a scheduler\planner to view appointments or tasks, and edit them? 

Enter HotDates. Add HotDates to your program and using the powerful and intuitive templates, you'll be able to view date related information in a calendar, drilling down to month, week and\or day views in a few minutes. Print your calendar straight to a printer, or edit date related information from the calendar using Drag and Drop, Cut\Copy\Paste or a traditional update.

Features

Included in HotDates:

  

De-activate items in the legend (using the checkboxes in the list):

Change priority of items viewed (using the runtime priority buttons):

Tutorial in adding HotDates to your Application

For this tutorial, we'll use the AutoLog.app that ships with Clarion 5.5. (I've included it in the clarionx\3rdparty\examples\HotDates\Tutorial for Clarion 6 users). I've included a completed tutorial in the examples. It's in the clarionx\3rdparty\examples\HotDates\Tutorial\Completed directory.

Adding the Colors and Settings tables to the application

The colors and settings tables aid us in setting up the colors styles and translation of day and month names for the application. You may not require both of these in your application, but for now, let's add them in so you can see what they are about.
1. Open the dictionary in the clarionx\3rdparty\examples\HotDates\Tutorial directory.
2. From the File menu, select the Import Text option.
3. Using the filedialog window, find the HotDatesSettingsTables.txd file which is located in your clarionx\3rdparty\libsrc directory by default.
4. Save and exit from the dictionary.

Adding a DatePicker and Settings windows to the application

If your application is not open - then open it in the Clarion IDE. 
1. From your Application menu, select the Template Utility... item.
2. Select the ImportHotDatesDatePickerABC template utility from the Select Utility window
3. From your Application menu, select the Template Utility... item.
4. Select the ImportHotDatesSettingsProceduresABC template utility from the Select Utility window.
5. Open the frame and add a Setup menu to your menubar
6. Add a Colors item to your Setup menu, and call the BrowseHotDates_Colors procedure from this item.
7. Add a Settings item to your Setup menu and call the BrowseHotDates_Settings procedure from this item.

Adding the Global Extension Template to the application

1. You need to first add the Global Extension Template. To do this:
1.1. Open the abcdemo.app in the Clarion IDE, and click on the Global button.
1.2. In the Global Properties window, click on the Extensions button.
1.3. Click on the Insert button and select the Activate_HotDates extension template.

We do this after adding the DatePicker, so that the DatePicker procedure field in the Global Extension template (Options tab) is automatically populated.

Adding a 1 to 12 Month Calendar to the BrowseTripLog window

A 1 to 12 month Calendar is a view that will show you very minimal detail - basically no descriptions, just colorized dates. It is aimed at giving you a broad spread of a wide date range of data into one summarized calendar - up to a year (which is scrollable).

1. Open the Window Formatter for the BrowseTripLog window (Right-click on the procedure name in the tree and select the Window option)
2. Add a tab control to the sheet and call it 'Calendar'.
3. Move the list from the window to the By VIN Number tab (so that we have a clean tab to work with).
4. Resize the sheet (and window) to about 400 by 240 to fit the calendar nicely on it.
5. Select Populate - Control Template... from the menu.
6. Select the HotDates_Calendar template from the Control template list. 
7. Click the top left corner for the group of controls to be placed on the window.
You will see 12 square list boxes (one for each month), the legend controls, and a group of buttons (ScrollBack, ScrollForward, Print and Refresh).
8. Right-Click on one of the controls and select the Actions menu item.
9. Click on the Tables button.

10. Insert the TripLog table, ordered by the TRI:VinDateKey and the Vehicles table. You'll also need to add the HotDates_Colors table to the Other tables.
11. Goto the Data tab and set it up as follows:

 

12. You will need to create a local data field: Loc:BusinessOnly (a byte with a true value of 1 and a false of 0 that has a checkbox as a screen control).
13. The Filter field is: (TRI:BusinessTrip=1) or ~Loc:BusinessOnly (this is so we can restrict to BusinessTrips if we check the checkbox)
14. The Style field: band(pointer(Vehicles),255). There is no autonumber on this file (which is what you could normally use) - so we'll use the pointer instead. Note that there are only 255 styles available, so if we have more that 255 records in the file, then these will be doubled up (in style)
15. Go to the Styles tab and set it up as follows:

 

16. Note that we use the parent table for the styles file.
17. The StyleID for the legend matches the Style we set up on the DataBase (so that the Style in the legend corrolates to that set in the calendar)
18. The Description is indicative of the car that did the trips: 'clip(VEH:Make) & ' ' & clip(VEH:Model) & ' ' & clip(VEH:Year)'
19. Note that we use colors from the HotDates_Colors table which is in a different table to that actual style, so we'll need to put some handcode to get the correct color.
20. Go to the Filter Embed and enter the following code in the 'Before Adding Style to the palette' embed:

HDCOL:StyleID = band(pointer(Vehicles),255)
access:HotDates_Colours.fetch(HDCOL:ByStyleID)

21. Go to the Options Tab

22. The StartDate is set to start at January this year.
23. 1. Set the From Date to the date to 'date(1,1,year(today()) - 10)'. This will go back to 10 years ago.
2. Set the To Date to the date to 'date(12,31,year(today()) + 1)'. This will go up to next year.
3. The scroll by is set to 12 to scroll an entire year at once.
24. The procedure for the MonthViewer has not yet been created, so we'll create that after we're finished with this window. 
25. Click OK to return to the Window Formatter.
26. Populate the Loc:BusinessOnly checkbox on the window. (Populate - Column and select Loc:BusinessOnly)
27. Double-click on the checkbox to bring up the embeds and place a call to reset the window in the Accepted embed:

self.reset(1)

Adding Update buttons to the Calendar

1. If you've exited out of the Window Formatter for the BrowseTripLog window, then re-open it again.
2. Select Populate - Control Template... from the menu.
3. Select the HotDates_CalendarUpdate template (for adding update controls to your 1 to 12 month Calendar) from the Control template list. 
4. Click the top left corner for the group of controls to be placed on the window. You will see the Insert, Change and Delete buttons appear on the window.
5. Right-click on one of the buttons and select the Actions... option

6. Go to the Prime Fields on Insert tab to the following: (Note you will need to wizard up a SelectVehicle window)

7. Basically what's happening here is that when you're inserting, you want the trip to start at the date clicked, and you want it to be attached to a selected variable (which is selected from the BrowseVehicles procedure).
8. Go to the Options tab and check the Add Update buttons to popup and the Allow inserts when a record exists on a date checkboxes (i.e. we want to be able to edit via popup and we also want to be able to insert a record on a particular day - even if there is already a trip allocated for another vehicle).

Before continuing we need to add a Select control to the BrowseVehicles routine.

1. If you've exited out of the Window Formatter for the BrowseTripLog window, then re-open it again.
2. Select Populate - Control Template... from the menu.
3. Select the BrowseSelectButton template from the Control template list. 
4. Click the top left corner for the group of controls to be placed on the window.

Adding a MonthViewer to a new window

The MonthViewer is designed to show you a entire month's data - with more detail than the 1 to 12 month Calendar. This will give you a description attached to each colorization, and if more than one data exists for a specific date, then it will show you more than the highest priority data for that day.

1. Double-Click on the MonthViewer (ToDo) procedure and select Window - Generic Window Handler from the Templates list.
2. Enter the Procedure's prototype and parameters fields as the following:

(long pStartDate=0)

3. Open the Window formatter (use the Simple Window template when prompted) and resize the window to:
385x220. You'll also need to make sure that this is an MDI Child window (the MDI Child checkbox on the Extra tab on the Window Properties window).
4. Select Populate - Control Template... from the menu.
5. Select the HotDates_MonthViewer template from the Control template list. 
6. Click the top left corner for the group of controls to be placed on the window.
You will see 2 buttons in a Group and the legend controls.
7. Right-click on one of the controls and select the Actions menu item.
8. Click on the Tables button and setup the tables as follows (You'll also need to add the HotDates_Colors table to the Other tables):.

9. Enter 'pStartDate' into the Start At Date field.

 

11. Goto the Data tab and set it up as follows:

 

12. You will need to create a local data field: Loc:BusinessOnly (a byte with a true value of 1 and a false of 0 that has a checkbox as a screen control).
13. The Filter field is: (TRI:BusinessTrip=1) or ~Loc:BusinessOnly (this is so we can restrict to BusinessTrips if we check the checkbox)
14. The Style field: band(pointer(Vehicles),255). There is no autonumber on this file (which is what you could normally use) - so we'll use the pointer instead. Note that there are only 255 styles available, so if we have more that 255 records in the file, then these will be doubled up (in style)
15. Go to the Styles tab and set it up as follows:

 

16. Note that we use the parent table for the styles file.
17. The StyleID for the legend matches the Style we set up on the DataBase (so that the Style in the legend corrolates to that set in the MonthView)
18. The Description is indicative of the car that did the trips: 'clip(VEH:Make) & ' ' & clip(VEH:Model) & ' ' & clip(VEH:Year)'
19. Note that we use colors from the HotDates_Colors table which is in a different table to that actual style, so we'll need to put some handcode to get the correct color.
20. Go to the Filter Embed and enter the following code in the 'Before Adding Style to the palette' embed:

HDCOL:StyleID = band(pointer(Vehicles),255)
access:HotDates_Colours.fetch(HDCOL:ByStyleID)

22. Go to the Options Tab and leave the default settings as they are. You can enter 'WeeklyPlanner' into the Drill down Procedure procedure.
23. Place the Loc:BusinessOnly checkbox control on your window (not inside the ?MonthViewGroup control)
24. Double-click on the Loc:BusinessOnly checkbox control and in the accepted event embed, place a call to a forced window reset:

self.reset(1)

Adding Update buttons to the MonthViewer

1. If you've exited out of the Window Formatter for the MonthViewer window, then re-open it again.
2. Select Populate - Control Template... from the menu.
3. Select the HotDates_MonthViewerUpdate template from the Control template list. 
4. Click the top left corner for the group of controls to be placed on the window. You will see the Insert, Change and Delete buttons appear on the window.
5. Right-click on one of the buttons and select the Actions... option

6. Go to the Prime Fields on Insert tab to the following: (Note you will need to wizard up a SelectVehicle window)

7. Basically what's happening here is that when you're inserting, you want the trip to start at the date clicked, and you want it to be attached to a selected variable.
8. Go to the Options tab and ensure the Add Update buttons to popup checkbox is checked (i.e. we want to be able to edit via popup).

Adding a 1 to 100 day Planner to a new window

The Planner gives you a bit more scope to work with than the MonthView. The MonthView is a 2 dimensional - date and "activities", whereas the Planner is 3 dimensional - Date, "activities" and parent data. I guess the best would to show a pictoral example:

The left column contains the parent data (in this case the 'People'). Each of the Day columns to the right of that contains activities that pertain to that Person.

1. Double-Click on the WeeklyPlanner (ToDo) procedure and select Window - Generic Window Handler from the Templates list.
2. Enter the Procedure's prototype and parameters fields as the following:

(long pStartDate=0)

3. Open the Window formatter (use the Simple Window template when prompted) and resize the window to:
525x255. You'll also need to make sure that this is an MDI Child window (the MDI Child checkbox on the Extra tab on the Window Properties window).
4. Click the top left corner for the group of controls to be placed on the window.
You will see 2 buttons in a Group and the legend controls.
5. Delete the controls that you don't require. You must leave the ?Planner control.
6. Right-click on one of the controls and select the Actions menu item.
7. Click on the Tables button.

8. Insert the tables that will contain the data to populate in the ListBox. The Primary table is the table that contains the data for the left column. (Note that we don't need the HotDates_Colors table here as we'l be styling this calendar slightly differently)
9. On the General tab:

10. Go to the Data tab.

 

11. The Left Heading field contains the heading (a constant, vairable or expression) for the left-most column.
12. The Displayed Data field contains the data for the left most column.
13. Note the Style field - instead of colorizing the cells by vehicle, we now have the rows which identify each vehicle. We'll colorize these cells with a different detail - i.e. business or private (2 for business and 1 for private).
14. The Data to Display field will contain the field or expression to place the data in each item in the row.
15. Go to the Styles tab and set the settings there as follows (setup the styles with differing colors):

16. Go to the Options tab and set the settings there as follows:

17. Save and quit out Window Formatter.
18. Open the Embeds - and find the Local Objects | Abc Objects | WindowManager | Init | CODE | ParentCall and enter the following source immediately after the Parent Call:

if pStartDate then Loc:StartDate = pStartDate .

This will set the StartDate to the date that we've passed to the window on startup.

Adding Update buttons to the WeeklyPlanner

1. If you've exited out of the Window Formatter for the WeeklyPlanner window, then re-open it again.
2. Select Populate - Control Template... from the menu.
3. Select the HotDates_PlannerUpdate template from the Control template list. 
4. Click the top left corner for the group of controls to be placed on the window. You will see the Insert, Change and Delete buttons appear on the window.
5. Right-click on one of the buttons and select the Actions... option

6. Go to the Prime Fields on Insert tab to the following: (Note you will need to wizard up a SelectVehicle window)

7. Basically what's happening here is that when you're inserting, you want the trip to start at the date clicked, and you want it to be attached to the Vehicle for that row.
8. Go to the Options tab and ensure the Add Update buttons to popup checkbox is checked (i.e. we want to be able to edit via popup).

Adding a DayScheduler

The DayScheduler will help us view the activities for each vehicle for the day.

There are two places in the tutorial application where we need to add the DatePicker Lookup HotKey extension: UpdateVehicles and UpdateTripLog.

1. Double-Click on the DayScheduler (ToDo) procedure and select Window - Generic Window Handler from the Templates list.
2. Enter the Procedure's prototype and parameters fields as the following:

(long pStartDate=0)

3. Open the Window formatter (use the Simple Window template when prompted) and resize the window to:
465x300. You'll also need to make sure that this is an MDI Child window (the MDI Child checkbox on the Extra tab on the Window Properties window).
4. Click the top left corner for the group of controls to be placed on the window.
You will see 2 buttons in a Group and the legend controls.
5. Right-click on one of the controls and select the Actions menu item.
6. Click on the Tables button.

8. Insert the tables that will contain the data to populate in the ListBox. The Primary table is the table that contains the data for the left column. (Note that we don't need the HotDates_Colors table here as we'l be styling this calendar slightly differently)
9. On the General tab, set the Display date to pStartDate.
10.  Go to the Headers tab and set the following settings (besides the defaults):

We've filtered out the vehicles that have a sold date (so the filter is VEH:DateSold=0), as we're only interested in current vehicles. Each vehicle will have it's own column showing the day's scheduled activity. The Displayed data shows the contents of the column heading (in this case clip(VEH:Make) & ' ' & clip(VEH:Model).
11.  Go to the Data tab and set the following settings:

We have an additional Time Limiting group - because in this HotDates view, we can view time detail. This is similar to the Date Stored as settings.
12.  Go to the Styles tab and set the following settings:

Adding Update buttons to the DayScheduler

1. If you've exited out of the Window Formatter for the DayScheduler window, then re-open it again.
2. Select Populate - Control Template... from the menu.
3. Select the HotDates_SchedulerUpdate template from the Control template list. 
4. Click the top left corner for the group of controls to be placed on the window. You will see the Insert, Change and Delete buttons appear on the window.
5. Right-click on one of the buttons and select the Actions... option

6. Go to the Prime Fields on Insert tab to the following: (Note you will need to wizard up a SelectVehicle window)

Basically what's happening here is that when you're inserting, you want the trip to start and end at the time block selected, and you want it to be attached to the Vehicle for that column. In this case we've checked the End time is at the end of the last block which means that the time selected is inclusive.
7. Go to the Options tab and ensure the Add Update buttons to popup checkbox is checked (i.e. we want to be able to edit via popup).

Adding the DatePicker Lookup Hotkey

1. Go back to the application IDE tree window, and double click on the UpdateVehicles procedure and click the Extensions button.
2. Select the HotDates_DatePickerHotKeyLookup template from the Extension template list. 

Repeat these 2 steps for the UpdateTripLog window. 

Another addition - you can add the DayScheduler to the options in the Main window, and then post an accepted event at startup to open the DayScheduler automatically.

The HotDates Templates (and how to add them to your Application)

The Global Extension template and Adding a DatePicker window to your application
Adding a 1 to 12 Month Calendar to your application
Adding Update buttons to your Calendar/View
Adding a MonthViewer to your application
The Weekly Planner Control Template
Adding a Day Scheduler to your application
Ways to use the DatePicker effectively (the Lookup button, and the window HotKey)

If you would like to use the HotDates_Colors table in your application for styling, then check this out in the Useful Tips section.

1. The first thing you need to do is add the DatePicker procedure (in a Multi-DLL application, this would be your root or data-DLL) - actually, you don't have to do this, but you'd lose a bunch of functionality by NOT doing this:

1. If your application is not open - then open it in the Clarion IDE. 
2. From your Application menu, select the Template Utility... item.
3. Select the ImportHotDatesDatePickerXXX template utility from the Select Utility window (where XXX=ABC for abc applications, and XXX=LEG for legacy based applications).

Check out the FAQs on using your own DatePicker if you'd like this option rather.

2. Then you need to add the Global Extension Template. To do this:
1. Open your app in the Clarion IDE, and click on the Global button.
2. In the Global Properties window, click on the Extensions button.
3. Click on the Insert button and select the Activate_HotDates extension template.

The following prompts are available on the Options tab of the Global Extension template:

1.1. Setting a global Refresh Event means that when performing operations between two calendar windows (like Drag and Drop or Cut/Copy/Paste), the originating window can be refreshed on a successful operation completed on the recipient window. You need to set this event to a unique event in the user event range (0400H-0FFFH). The default is 082EH.
1.2. You can specify a Legend List row height for all your legend lists here.
2.1. If you imported the DatePicker procedure, then ensure the Date Picker Procedure field is pointing to the DatePicker you required (otherwise leave it blank).
2.2. To call the DatePicker procedure using a HotKey, specify the Date-Picker HotKey here. You will need to add the DatePicker HotKeyLookup extension to each window where you require the use of the HotKey.
2.3. If you have a Multi-DLL application, then you can place your DatePicker procedure in a DLL, and all your other applications can use the one DatePicker procedure in that DLL. In this case, check the HotDates globals are in another app checkbox and enter the name of the DatePicker procedure in the string provided above that. Your DatePicker HotKey, First Weekday and Refresh event will also be set only in the Multi-DLL.
2.4. If you would like to manually map the DatePicker, then you can check the Don't automatically map the procedure checkbox. In this case, you will need to manually code the Map to your DatePicker window in the Global map. 
2.5. You can set the Date-Field Altercator keys in the fields provided. This simply means that all the Hotdates DateEntry templates will use these settings for global date-entry compatibility. If you don't require one (or more) of the HotKeys, then clear the entry.

3. If you'd like to customize your Planner and Scheduler zoom settings, then you can check the Customize Zoom Settings checkbox and the Zoom settings groups will appear (otherwise the default will be used), allowing you to set:
3.1. Zoom steps (i.e. the amount of times to click the zoom out (or zoom in) to get from the lowest to highest (or visa-versa) resolution of the column width.
3.2. Minimum Column width - the narrowest column width to zoom out to.
3.3. Maximum Column width - the widest column width to zoom in to.

4.1. You can select a first weekday (by default Sunday) using the First Weekday drop down. This will force the left most day of all the calendars to the day you specify.
4.2. If you want to enable the user to set the various global HotDates settings on the fly, then you can do this using the HotDates Settings Table. Check out the Using the HotDatesSettingsTable (to store multiple sets of Translation and other global settings) section of this doc for more details.

Adding a 1 to 12 Month Calendar to your application

1.1. Open the Window Formatter for the window that you are wanting to add the Calendar to.
1.2. Select Populate - Control Template... from the menu.
1.3. Select the HotDates_Calendar template from the Control template list. 
1.4. Click the top left corner for the group of controls to be placed on the window.
You will see 12 square list boxes (one for each month), the legend controls, and a group of buttons (ScrollBack, ScrollForward, Print and Refresh).
1.5. Delete the controls that you don't require. These could include some of the month list boxes (if you don't require a full 12 month calendar) starting from the bottom right and proceeding left, the legend priority buttons (two buttons one with the SortUp and the other with the SortDown icons), the ScrollBack & ScrollForward buttons. You must leave the ?CalendarGroup and at least one list control.
1.6. Right-Click on one of the controls and select the Actions menu item.
2.1. Click on the Tables button.

2.2. Insert the files that will contain the data to populate on the Browse. If there is more than one table required to extricate the data, then use the one with the StartDate as the Primary file. This will also be the file which gets primed for update when we add the update buttons later. If you are using the HotDates_Colors table for your style-colors, then you need to add the HotDates_Colors table to your Other Tables.
2.3. You can also enter an optimum key to sort the table by. This should be a unique key (to obtain the correct record for updating).
2.4. On the General tab:

2.5. The StartDate field sets the month and year of the top-left month in the calendar when the window is opened. Leave it blank for today. Tip: You can enter date(1,1,year(today())) to show the whole of this year starting at January.
2.6. If you want to be able to scroll (i.e. back date or forward date), then check the Enable Scrolling checkbox. Otherwise the calendar will be fixed.
1. Set the From Date to the date to which you can scroll _back_ to. (leave blank for January last year)
2. Set the To Date to the date to which you can scroll _forward_ to.(leave blank for December next year)
3. Set the number of months to scroll by in the Scroll by (months) entry (normally 1 - although you may want to jump by up to an entire year - in which case you would enter 12).
2.7. The Print group contains options that pertain to the calendar when outputting to a printer:
1. Heading: (oddly enough) the heading that appears at the top of the report.
3.1. Goto the Data tab.

 

3.2. Select the method by which the Data is stored (either a single date, a Date Range [i.e. FromDate-ToDate], a Date Duration or handcoded).
3.3. You'll need to enter a from date, an end date (for Date Ranges) and/or a date duration (for DateDuration) expression depending on the method that you selected in the 'Stored As' drop down.
3.4. If you're using a ToDate (end date) option, and your end dates may be blank, then you'll need to check the ToDate optional (infinite when 0). Otherwise the EndDate will be assumed to be correct at 0.
3.5. If you have multiple records for days, and you would like to use totalling to reflect a sum, count, average, maximum or minimum of the values for those days, then you can check the Style based on totalling checkbox.

3.6. If you checked Style based on totalling checkbox, then pick a Total Type from the drop combo. Count will count the records that pertain to each calendar day; Sum will add the Total Field/expr for each record that pertains to a day; Maximum will reflect the maximum to the Total Field/expr for each record that pertains to a day; Minimum does the inverse, and Average reflects the mean od the Total Field/expr for all records for each day. 

Note: The result (for each day) will be stored in DatesQueue:<x>.Total (where x is the ActiveTemplateInstance for this control template addition). You can use this value in your Style expression.

3.7. The Style entry needs to contain a field or expression for the style of the data on the view. Check out the Useful Tips on more possible uses. This Style ID is a numeric that references to the Style ID in the styles (or legends) setup on the Styles tab.
3.8. You can enter an expression to filter unwanted data in the Filter field.
3.9. To code a more indepth filter, you can use the Embeds, accessible via the Filter Embed button. For more details, check out the useful tips section on Coding Manual Filters
4.1. Go to the Styles tab.

 

4.2. This tab is used to setup the details for the legend controls. You can have up to 5 columns in the legend control (in case you want it horizontally, rather than vertically)
4.3. If you want to be able to optionally view styles at runtime, then check the Use Checkboxes to activate styles checkbox. Otherwise all styles will be displayed.
4.4. To keep your style settings (style priority and active state) between sessions, you can check the Save and Restore checkbox.
4.5. If your styles are stored in a style file, then you can check the Load Styles from a File checkbox. Otherwise you can set them up in the Manual Styles list box.
4.6. If your styles will be loaded from a file, then you need to enter the Styles details. The File, Key, StyleID to use, Colors and Description (which is the text in the style entry in the legend list describing the style). The StyleID must be a byte value (between 1 and 255) - which will be used as a reference to the Style field on the Data tab. You don't have to have a relationship between the table used for the styles and the table for the data - although a Style reference in the data should exist in the Styles table.

If you check the Sort styles in Key order checkbox, then when the items initially appear in the listbox, they will appear sorted in the order of the key specified in the Key field  - otherwise they will be sorted in  StyleID order.

4.7. Similarly with Manual styles, you can set the above settings from the template.
5.1. Go to the Options Tab

 

5.2. If you don't want the year to be shown in the month header, then check the Year portion of date is irrelevant checkbox. This is useful for yearless calendars (like Birthday calendars, etc).
5.3. You can Enable Drill Down and enter a drill down procedure in the Drill down procedure drop list. This will enable a day/week/month to be expanded. If your drill down procedure takes more than one parameter, then you can handcode the call to the drill down using the Handcode Drill down call embed button. You need to pass the clickdate property so that the receiving procedure will display the correct start date. Example:

ViewMonth(ThisYear5.clickdate)

5.4. The Cell Tips  section lets you set up cell tip information. You can leave this blank to omit cell tips. The field provided is a formula in which you can use fields from files in your HotDates tables. If you require the use of other fields (from tables that are not in the HotDates tables) - then you can use the Coded Lookups button to handcode into the embed.
5.5. If you have Replicate added to this application, then you will be able to Turn Replicate off during calendar loading. This is very useful if your HotDates view has a lot of data, and the calendar takes a long time to load. Please read the Clarion5.5 caveat in the FAQs.
5.6. Go to the Classes tab and set the Based on Class to YearClass and the Object Name to something unique and descriptive like ThisYear1.

Adding Update buttons to your Calendar/View 

1.1. Open the Window Formatter for the Calendar/View window.
1.2. Select Populate - Control Template... from the menu.
1.3. Select the HotDates_CalendarUpdate template (for adding update controls to your 1 to 12 month Calendar), HotDates_MonthViewerUpdate template (for adding update controls to your MonthViewer) or HotDates_PlannerUpdate template (for adding update controls to your Planner) from the Control template list. 
1.4. Click the top left corner for the group of controls to be placed on the window. You will see the Insert, Change and Delete buttons appear on the window.
2.1. Right-click on one of the buttons and select the Actions... option

2.2. Select the Update File - if there is no unique key found, then you will need to enter a Key to access the file by.
2.3. Enter the Update Procedure that will be used to update the record.
2.4. If the procedure takes Parameters, then you can enter those in the field provided.
3.1. Go to the Prime Fields on Insert tab

3.2. Enter the field that will receive the date that is clicked in the Field for Clicked date entry.
3.3. If your displayed data is stored as a date range (FromDate-Todate or DateDuration), then you can enter the field that will receive the ToDate (or Duration) that is clicked in the Field for End date entry. This will allow a date range selection in the calendar using ShiftMouseLeft.
3.4. You may want to select a parent record to relate a clicked entry to. You can enter the procedure used to select the parent in the Parent record using: drop list.
3.5. To prime other fields, use the Other fields to prime list box to enter variables to be primed with their respective values.
3.6. If you have entered a End date field (i.e. you are allowing date range selection), then you need to stipulate a identification for the selection in the Selected Date Range Identification group.
3.7. The following options are available for the Update buttons in a DayScheduler as well:

3.8. Field for Clicked Time is the data field to receive the value of the start of the clicked time range (if it's a range) or the clicked time cell (if no range is selected).
3.9 Field for End Time is the data field to receive the last time of the time range selected. If you don't want to enable time range selection, then leave this blank.
3.10 You can use the checkbox End Time is at the end of the last block to determine whether the End Time is at the end of the last selected cell or at the beginning.
4.1. Go to the Options tab

4.2. If you want to edit view Right-Click and popup, then check the Add Update buttons to popup checkbox.
4.3. Your Legend is by default not refreshed after a table update (from the calendar). However, in some cases your Legend may have changed when your tables were updated, so you may like to check the Refresh Legend list after Update checkbox in order to refresh the legend list on the screen. Otherwise the legend will remain the same as before a table edit.
4.4. You may like to allow Inserts even if there is already a record on a date. In this case check the Allow inserts when a record exists on a date checkbox. Otherwise you will not be able to insert a record if the date is styled.
4.5. If you would like to support drag and drop on this calendar, then enter a Unique Drag ID (which should match your other calendars that you want to drag from and drop to). The Drag and Drop ID is populated with a default, but you can change this to a unique one if you'd like to.
4.6. If you are supporting Cut|Copy|Paste, then it's a good idea to use the Unique Drag ID for the Paste ID - in order to prevent mismatched pasting from the clipboard.
4.7. If you are supporting Cut|Copy|Paste and\or Drag and Drop, then you'll need to handcode a validation routine to avoid duplication occuring (Useful Tip: 11. Validating Paste and Dropped data entries).
4.8. Go to the Classes tab
4.9. Go to the Classes tab and set the Based on Class to PopupClass and the Popup Object Name to something unique and descriptive like ThisPopup1.

Adding a MonthViewer to your application

1.1. Open the Window Formatter for the window that you are wanting to add the Month Viewer to.
1.2. Select Populate - Control Template... from the menu.
1.3. Select the HotDates_MonthViewer template from the Control template list. 
1.4. Click the top left corner for the group of controls to be placed on the window.
You will see 2 buttons in a Group and the legend controls.
1.5. Delete the controls that you don't require. You must leave the ?MonthViewGroup.
1.6. Right-click on one of the controls and select the Actions menu item.
1.7. Click on the Tables button.

1.8. Insert the files that will contain the data to populate on the Browse. If there is more than one table required to extricate the data, then use the one with the StartDate as the Primary file. This will also be the file which gets primed for update when we add the update buttons later. If you are using the HotDates_Colors table for your style-colors, then you need to add the HotDates_Colors table to your Other Tables.
1.9. You can also enter an optimum key to sort the table by. This should be a unique key (to obtain the correct record for updating).
2.0. Go to the Data tab.

 

2.1. Select the method by which the Data is stored (either a single date, a Date Range [i.e. FromDate-ToDate], a Date Duration or handcoded).
2.2. You'll need to enter a from date, an end date (for Date Ranges) and/or a date duration (for DateDuration) expression depending on the method that you selected in the 'Stored As' drop down.
2.3. If you're using a ToDate (end date) option, and your end dates may be blank, then you'll need to check the ToDate optional (infinite when 0). Otherwise the EndDate will be assumed to be correct at 0.
2.4. The Style entry needs to contain a field or expression for the style of the data on the view. Check out the Useful Tips on more possible uses. This Style ID is a numeric that references to the Style ID in the styles (or legends) setup on the Styles tab.
2.5. You can enter an expression to filter unwanted data in the Filter field.
2.6. To code a more indepth filter, you can use the Embeds, accessible via the Filter Embed button. For more details, check out the useful tips section on Coding Manual Filters
2.7. The Data to Display field will contain the field or expression to place the data in each item in the daylist in the month.
2.8. The ID of the Icon to display is used to tell HotDates which icon to place at the items entry in the daylist. This is probably initially disabled - and will be enabled after you've set the Icons up in the Icons tab. Similarly to the Style field, you can place a formula to obtain the correct icon ID.
3.0. Go to the Styles tab. Check out the Calendar Control template for help in setting up styles.
4.0. Go to the Icons Tab

4.1. If you are not going to use Icons, then leave the Use Icons unchecked and move straight on to the Options tab (below). Otherwise check the UseIcons checkbox.
4.2. Select whether you want the Icons to be Transparent or Normal Square icons (in the daylists)
4.3. If your Icons are stored in a table, then check this checkbox, otherwise leave it unchecked and manually enter the icon files and their respective IDs in the list box on this tab.
4.4. If your Icons are stored in a table, then enter the Icon Table name, the Key to access the table, the Icon Number field, and the Icon File field that contains the Filename for the icon.
5.0. Go to the Options Tab

5.1. The Date indicator is a numbered string that floats ontop of the date data box. You can set the Color, the proportional size (in relation to the ListBox), and the position (Vertical and Horizontal Orientation). The Today's Date Color field allows you to use a different color to highlight today's date on the calendar. You can leave this blank if you don't want Today's date to be highlighted.
5.2. The Heading in the Print group is the heading that will appear at the top of the MonthView printout. (Check FAQ 6.1. for more detail on how to print out the MonthView)
5.3. If the Year portion of date is irrelevant (i.e. this displays data like birthdays or anniversaries where data must not be filtered out where the year does not match the current year) then check this checkbox.
5.4. You can Enable Drill Down and enter a drill down procedure in the Drill down procedure drop list. This will enable a day/week/month to be expanded. If your drill down procedure takes more than one parameter, then you can handcode the call to the drill down using the Handcode Drill down call embed button. You need to pass the clickdate property so that the receiving procedure will display the correct start date. Example:

ViewMonth(ThisYear5.clickdate)

5.5. The Drill Up follows the same principles as Drill Down (immediately above).
5.6. The Cell Tips  section lets you set up cell tip information. You can leave this blank to omit cell tips. The field provided is a formula in which you can use fields from files in your HotDates tables. If you require the use of other fields (from tables that are not in the HotDates tables) - then you can use the Coded Lookups button to handcode into the embed.
5.7. If you have Replicate added to this application, then you will be able to Turn Replicate off during calendar loading. This is very useful if your HotDates view has a lot of data, and the calendar takes a long time to load. Please read the Clarion5.5 caveat in the FAQs.
6.0. Go to the Classes tab and set the Based on Class to MonthListClass and the Object Name to something unique and descriptive like ThisMonth1.

Check out the Adding Update buttons to your Calendar/View to add update buttons to your Month View.

The Week/Month Planner Control Template

The WeeklyPlanner gives you a bit more scope to work with than the MonthView. The MonthView is a 2 dimensional - date and "activities", whereas the Weekly Planner is 3 dimensional - Date, "activities" and parent data. I guess the best would to show a pictoral example:

The left column contains the parent data (in this case the 'People'). Each of the Day columns to the right of that contains activities that pertain to that Person.

Your WeeklyPlanner procedure must be prototyped with at least a StartDate if you're using the Drill down/up functionality in HotDates:

WeeklyPlanner        procedure (long pStartDate=0)

1.1. Open the Window Formatter for the window that you are wanting to add the WeeklyPlanner to.
1.2. Select Populate - Control Template... from the menu.
1.3. Select the HotDates_Planner template from the Control template list. 
1.4. Click the top left corner for the group of controls to be placed on the window.
You will see 2 buttons in a Group and the legend controls.
1.5. Delete the controls that you don't require. You must leave the ?Planner control.
1.6. Right-click on one of the controls and select the Actions menu item.
1.7. Click on the Tables button.

1.8. Insert the tables that will contain the data to populate on the Browse. You should make the Primary table the table that contains the data for the left column. You can attach a keyed order to the Primary table in order to sort the data. The table that contains the daily details data should be added to this tree as well. If you are using the HotDates_Colors table for your style-colors, then you need to add the HotDates_Colors table to your Other Tables.
2.1. On the General tab:

2.2. The From Date indicates the date of the 2nd column. You can use the Loc:StartDate variable (which has an entry control as part of the control template), a fixed date (like today()) or an expression.
2.3. The Prime Loc:StartDate with passed date. If you're using a variable startdate (in the FromDate), then you can get the template to prime this variable with the parameter passed (from drill-down/up).
2.4. The Days to view indicates (oddly enough) the number of days to view in the list. You can use the Loc:DaysToView (which has an entry control as part of the control template), a fixed number (like 7) or an expresion (like day(date(month(today())+1,1,year(today())))).
2.5. The Details per day indicates the number of detail rows to have per parent (left column) per day. You can use the Loc:DetailsPerDay (which has an entry control as part of the control template), a fixed number (like 3) or an expresion.
2.6.. The Heading field contains the heading (a constant, vairable or expression) for the left-most column.
2.7. The Filter field is used to filter out obsolete records from being added to the queue.
2.8. The Displayed Data field contains the data for the left most column.
2.9. The Width field contains the initial width for the left most column.
3.1. Go to the Data tab.

3.2. The Date Picture for Column Headers is the format in which the date must be displayed in the column heading (from column 2 onwards)
3.3. The Use American Date for abbreviated dates checkbox is used to format the date into American date order when an abbreviated date must be used in the column header because of space limitations.
3.4. Select the method by which the Data is stored (either a single date, a Date Range [i.e. FromDate-ToDate], a Date Duration or handcoded).
3.5. You'll need to enter a from date, an end date (for Date Ranges) and/or a date duration (for DateDuration) expression depending on the method that you selected in the 'Stored As' drop down.
3.6. If you're using a ToDate (end date) option, and your end dates may be blank, then you'll need to check the ToDate optional (infinite when 0). Otherwise the EndDate will be assumed to be correct at 0.
3.7. The Style entry needs to contain a field or expression for the style of the data on the view. Check out the Useful Tips on more possible uses. This Style ID is a numeric that references to the Style ID in the styles (or legends) setup on the Styles tab.
3.8. You can enter an expression to filter unwanted data in the Filter field.
3.9. The Data to Display field will contain the field or expression to place the data in each item in the row.
3.10. The ID of the Icon to display is used to tell HotDates which icon to place at the items entry in the row. This is probably initially disabled - and will be enabled after you've set the Icons up in the Icons tab. Similarly to the Style field, you can place a formula to obtain the correct icon ID.
3.11. The default Heading Justification drop down can be used to select an alternative justification for the column headers. Force to Left, Center, Right - or use the default.
4.1. Go to the Queue tab.

4.2. You can sort the child data cells (in the rows) in 3 possible orders - by the order that is in the Legend, in the DisplayData order (which is simply sorted by string), or in a customizable order (Other).
4.3. If you selected Other in the Row Data Ordered by drop down list, then you can enter a manual sort order in the embed provided. Your primary sort fields, must always be those used in the left column, and then in specific child fields. For example:

sort(DatesQueue:1,DatesQueue:1.PEO:PeopleID,DatesQueue:1.TAS:TaskTime)

4.4. If you are coding a manual filter (for populating data from the template generated queue to the planner queue) - then you need to add the fields to the template queue that you will use in the filter. These will be the file fields, but in the coded filter, you must use their queue field equivalents.
4.5. To code a more indepth filter, you can use the Embeds, accessible via the Filter Embed button. For more details, check out the useful tips section on Coding Manual Filters
5.1 Go to the Styles tab. Check out the Calendar Control template for help in setting up styles.
6.1. Go to the Icons Tab.