<calendar>

New to Version 3.0

 

The <calendar> tag is a child tag that, when used with the <input> tag, displays a link to pop-up DotNetNuke's pop-up calendar. The user can manipulate this calendar to select a date. Note that the pop-up calendar uses Javascript. The <calendar> tag can be placed within <input> and <dateinput> tags. Additionally, custom HTML layout forms can position <calendar> tags elsewhere in the form. When doing so, you will need to specify  ref and targetcontrol attributes (see below).

 

ATTRIBUTES <calendar>:

class

Name of the CSS Class used to style the link (Optional) [String value]

display

Determines the visual appearance of the control at run-time. Valid values are:

  • button - The control will appear as a standard HTML button

  • imagebutton - The control will appear as a clickable image (see imageurl, imageheight, and imagewidth for additional image-related properties)

  • linkbutton - The control will appear as a hyperlink

New to Version 4.0

format

Optional. If specified, this overrides the default date format used by the pop-up calendar. If left blank, the web server's default short date format will be used. This attribute is useful if you'd like to sort on the date value. Most likely you'll use something like this: format="yyyy-MM-dd" where "yyyy" returns the four digit year, "MM" returns a two-digit month, and "dd" returns a two-digit day. You might also want to use regular expression validation to make sure the value stays in that format.

imageheight

When display is set to imagebutton, this determines the height of the image in pixels. Only numeric values are allowed.

New to Version 4.0

imageurl

When display is set to imagebutton, this determines what image will be shown. You can use a full URL (http://mysite.com/images/myimage.gif); a relative URL (/images/myimage.gif); or use the site root shortcut character (~/images/myimage.gif)

New to Version 4.0

imagewidth

When display is set to imagebutton, this determines the width of the image in pixels. Only numeric values are allowed.

New to Version 4.0

ref

A unique identifier for this control. The value must be unique within the form. Required only if the <calendar> tag isn't a child tag of <input> or <dateinput>. Ref shouldn't be specified in those cases.

style

This pass-through HTML property allows you to set the CSS style properties of the control. (Optional)

targetcontrol

The ref of the <input>, <dateinput> or other ASP.NET text box control into which the calendar's selected date will be placed. This attribute should only be used if the <calendar> tag is being used outside of the <input> or <dateinput> tags.

text

Required. The value of the text attribute will be used as the caption for the link to pop-up the calendar.

EXAMPLES:

<input ref="EventDate">

  <label>Event Date</label>

  <calendar text="Choose Date" class="Normal"></calendar>

</input>

 

 

<input ref="EventDate">

  <label>Event Date</label>

  <calendar text="Choose Date" display="imagebutton" imageurl="~/images/calendar.gif"  class="Normal"></calendar>

</input>

 

In a custom HTML layout form, using the <calendar> tag outside the <input> tag allows the HTML button to be placed underneath the text box, instead of to the right...

...

<literal><tr><td>Event Date</td><td></literal>

<input ref="EventDate">

  <label>Event Date</label>

</input><literal><br /></literal>

<calendar ref="calEventDate" targetcontrol="EventDate" text="Choose Date" display="button"/>

<literal></td></tr></literal>

...