Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

How to set the default date for the Calendar control in FrontPage 2003


View products that this article applies to.

Summary

When you insert the ActiveX Calendar Control in Microsoft Office FrontPage 2003, the default date is set to the date when the page was created. This article describes two methods to set the default date value for the ActiveX Calendar Control.

Set the Default Date for the Calendar Control with the ActiveX Control Properties

  1. Open a Web in FrontPage 2003 on a Microsoft Internet Information Services (IIS) Web server.
  2. Open a new blank page.
  3. Insert the Calendar Control. To do this, follow these steps:
    1. On the Insert menu, click Web Component.
    2. Under Component type, click Advanced Controls.
    3. Under Choose a control, click ActiveX Control, and then click Next.
    4. Click Calendar Control 11.0, and then click Finish.
  4. Right-click the Calendar Control, and then click ActiveX Control Properties.
  5. On the General tab, change the Value box to the date that you want as the default date, and then click OK.

    Note The ActiveX Control Properties dialog box contains many other options and parameters that you can change to customize the Calendar Control.

Set the Default Date for the Calendar Control by Using ASP

Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements. Note You may receive an error message if you copy the examples directly from this article and paste them into FrontPage 2003. The angle brackets (< and >) may appear as escaped HTML code (< and >). To work around this behavior, paste the script into a blank Notepad document, and then copy it from Notepad before you paste it into FrontPage 2003.
  1. Open a Web in FrontPage 2003 on an Internet Information Services (IIS) Web server.
  2. Open a new blank page.
  3. Insert the Calendar Control. To do this, follow these steps:
    1. On the Insert menu, click Web Component.
    2. Under Component type, click Advanced Controls.
    3. Under Choose a control, click ActiveX Control, and then click Next.
    4. Click Calendar Control 11.0, and then click Finish.
  4. Click Code (Show Code View) to view the HTML code for your Web page.
  5. Find the section of code that is similar to this:
    <param name="Year" value="2003">
    <param name="Month" value="10">
    <param name="Day" value="5">
    
    Change the code to look similar to this:
    <param name="Year" value="<%=Year(Date())%>">
    <param name="Month" value="<%=Month(Date())%>">
    <param name="Day" value="<%=Day(Date())%>">
    
  6. Click Design (Show Design View).
  7. On the File menu, click Save As and save your page with the ASP extension.
When you locate the page by using HTTP, the ASP code automatically creates the default date based on the current date.

↑ Back to the top


Keywords: KB825492, kbhowtomaster, kbasp, kbcalendar

↑ Back to the top

Article Info
Article ID : 825492
Revision : 5
Created on : 1/6/2006
Published on : 1/6/2006
Exists online : False
Views : 384