bicalendar.html
来自「ajax 框价.是个好工具.javascript 矿家.可以用在任何平台.」· HTML 代码 · 共 448 行
HTML
448 行
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html><!--Generated using api.website.xsl version 2003-07-17--><head><META http-equiv="Content-Type" content="text/html; charset=utf-8"><title>BiCalendar</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><link type="text/css" rel="stylesheet" href="api.css"><script type="text/javascript"> function showDerivedClasses() { var ul = document.getElementById("api-derived-classes"); var lis = ul.childNodes; var l = lis.length; for (var i = 1; i < l; i++) lis[i].style.display = ""; lis[0].style.display = "none"; } </script></head><body><h1 id="BiCalendar">BiCalendar</h1><p>This class represents a calendar control</p><p>This class extends <code><a href="BiComponent.html">BiComponent</a></code> and therefore all methods and fields available for <code><a href="BiComponent.html">BiComponent</a></code> are also available for <code>BiCalendar</code>.</p><ul class="partial-class-tree"><li><code><a href="BiObject.html">BiObject</a></code><ul><li><code><a href="BiEventTarget.html">BiEventTarget</a></code><ul><li><code><a href="BiComponent.html">BiComponent</a></code><ul><li><code>BiCalendar</code><ul id="api-derived-classes"></ul></li></ul></li></ul></li></ul></li></ul><h2>Constructor</h2><p><code> new BiCalendar([<span class="methodArgument">oDate</span>])</code></p><h3>Parameters</h3><table><thead><tr><td>Name</td><td>Type</td><td class="optional-header">Optional</td><td>Default</td><td>Descripton</td></tr></thead><tbody><tr><td><code>oDate</code></td><td><code class="type">Date</code></td><td class="optional-column"><img src="check.png" alt="checked"></td><td></td><td>Optional javascript date object used to determine the month that should be displayed when the calendar is created.</td></tr></tbody></table><h2>Properties</h2><table><thead><tr><td>Name</td><td>Type</td><td class="get-header">get</td><td class="set-header">set</td><td>Descripton</td></tr></thead><tbody><tr><td><a name="captionText"></a><code>captionText</code></td><td><code class="type">String</code></td><td class="get-column"><img src="check.png" alt="checked"></td><td class="set-column"></td><td>The text to show in the caption</td></tr><tr><td><a name="currentDate"></a><code>currentDate</code></td><td><code class="type">Date</code></td><td class="get-column"><img src="check.png" alt="checked"></td><td class="set-column"><img src="check.png" alt="checked"></td><td>The date describing the currently shown month. To get the selected date(s) use selectedDate(s)</td></tr><tr><td><a name="dateFormatSymbols"></a><code>dateFormatSymbols</code></td><td><code class="type"> <code><a href="BiDateFormatSymbols.html">BiDateFormatSymbols</a></code> </code></td><td class="get-column"><img src="check.png" alt="checked"></td><td class="set-column"><img src="check.png" alt="checked"></td><td>The object providing the date picker with the symbols needed to display localized strings</td></tr><tr><td><a name="selectedDate"></a><code>selectedDate</code></td><td><code class="type">Date</code></td><td class="get-column"><img src="check.png" alt="checked"></td><td class="set-column"><img src="check.png" alt="checked"></td><td>The selected date.</td></tr><tr><td><a name="selectedDates"></a><code>selectedDates</code></td><td><code class="type">Date[]</code></td><td class="get-column"><img src="check.png" alt="checked"></td><td class="set-column"><img src="check.png" alt="checked"></td><td>These are the selected dates. In case multiple selection is used then use this instead of <code><a href="#selectedDate">selectedDate</a></code> </td></tr><tr><td><a name="selectionModel"></a><code>selectionModel</code></td><td><code class="type"> <code><a href="BiCalendarSelectionModel.html">BiCalendarSelectionModel</a></code> </code></td><td class="get-column"><img src="check.png" alt="checked"></td><td class="set-column"></td><td>This is the selection model used for the calendar</td></tr><tr><td><a name="showCaption"></a><code>showCaption</code></td><td><code class="type">Boolean</code></td><td class="get-column"><img src="check.png" alt="checked"></td><td class="set-column"><img src="check.png" alt="checked"></td><td>Whether to show the caption or not</td></tr><tr><td><a name="showMonthButtons"></a><code>showMonthButtons</code></td><td><code class="type">Boolean</code></td><td class="get-column"><img src="check.png" alt="checked"></td><td class="set-column"><img src="check.png" alt="checked"></td><td>Whether to show the buttons that allow you to go to next or previous month in the caption</td></tr><tr><td><a name="showYearButtons"></a><code>showYearButtons</code></td><td><code class="type">Boolean</code></td><td class="get-column"><img src="check.png" alt="checked"></td><td class="set-column"><img src="check.png" alt="checked"></td><td>Whether to show the buttons that allow you to go to next or previous year in the caption</td></tr></tbody></table><h2>Methods</h2><table><thead><tr><td>Name</td><td>Description</td></tr></thead><tbody><tr><td><code><a href="#goToMonth">goToMonth</a></code></td><td>Goes to the given month. Note that months are numbered from 0 to 11 in Javascript.</td></tr><tr><td><code><a href="#goToToday">goToToday</a></code></td><td>Goes to today and selects that day</td></tr><tr><td><code><a href="#goToYear">goToYear</a></code></td><td>Goes to the given year</td></tr><tr><td><code><a href="#nextMonth">nextMonth</a></code></td><td>Goes to the next month</td></tr><tr><td><code><a href="#nextYear">nextYear</a></code></td><td>Goes to the next year</td></tr><tr><td><code><a href="#previousMonth">previousMonth</a></code></td><td>Goes to the previous month</td></tr><tr><td><code><a href="#previousYear">previousYear</a></code></td><td>Goes to the previous year</td></tr><tr><td><code><a href="#updateDateLabel">updateDateLabel</a></code></td><td>This is called when the date label should be updated. Override this to add custom drawing of the label</td></tr></tbody></table><h2>Events</h2><table><thead><tr><td>Name</td><td>Type</td><td class="bubbles-header">Bubbles</td><td>Descripton</td></tr></thead><tbody><tr><td><a name="action"></a><code>action</code></td><td><code class="type"> <code><a href="BiEvent.html">BiEvent</a></code> </code></td><td class="bubbles-column"></td><td>This event is fired when the user clicks on a day</td></tr><tr><td><a name="change"></a><code>change</code></td><td><code class="type"> <code><a href="BiEvent.html">BiEvent</a></code> </code></td><td class="bubbles-column"></td><td>This event is fired when the selection changes</td></tr></tbody></table><h2>Static Methods</h2><table><thead><tr><td>Name</td><td>Description</td></tr></thead><tbody><tr><td><code><a href="#isSameDay">isSameDay</a></code></td><td>This returns true if two dates represent the same day</td></tr><tr><td><code><a href="#isSameMonth">isSameMonth</a></code></td><td>This returns true if two dates represent the same month</td></tr></tbody></table><h2>Static Fields</h2><p>None.</p><h2>Remarks</h2><p> </p><h2>Method Details</h2><h3><a name="goToMonth"></a>goToMonth</h3><p>Goes to the given month. Note that months are numbered from 0 to 11 in Javascript.</p><h4>Syntax</h4><pre class="method-syntax">object.goToMonth(<span class="methodArgument">nMonth</span>)</pre><h4>Parameters</h4><table><thead><tr><td>Name</td><td>Type</td><td class="optional-header">Optional</td><td>Default</td><td>Descripton</td></tr></thead><tbody><tr><td><code>nMonth</code></td><td><code class="type">Number</code></td><td class="optional-column"></td><td></td><td>The index of the month to go to</td></tr></tbody></table><h4>Return Type</h4><p><code class="type">void</code></p><h3><a name="goToToday"></a>goToToday</h3><p>Goes to today and selects that day</p><h4>Syntax</h4><pre class="method-syntax">object.goToToday()</pre><h4>Parameters</h4><p>No arguments.</p><h4>Return Type</h4><p><code class="type">void</code></p><h3><a name="goToYear"></a>goToYear</h3><p>Goes to the given year</p><h4>Syntax</h4><pre class="method-syntax">object.goToYear(<span class="methodArgument">nFullYear</span>)</pre><h4>Parameters</h4><table><thead><tr><td>Name</td><td>Type</td><td class="optional-header">Optional</td><td>Default</td><td>Descripton</td></tr></thead><tbody><tr><td><code>nFullYear</code></td><td><code class="type">Number</code></td><td class="optional-column"></td><td></td><td>The year to go to</td></tr></tbody></table><h4>Return Type</h4><p><code class="type">void</code></p><h3><a name="nextMonth"></a>nextMonth</h3><p>Goes to the next month</p><h4>Syntax</h4><pre class="method-syntax">object.nextMonth()</pre><h4>Parameters</h4><p>No arguments.</p><h4>Return Type</h4><p><code class="type">void</code></p><h3><a name="nextYear"></a>nextYear</h3><p>Goes to the next year</p><h4>Syntax</h4><pre class="method-syntax">object.nextYear()</pre><h4>Parameters</h4><p>No arguments.</p><h4>Return Type</h4><p><code class="type">void</code></p><h3><a name="previousMonth"></a>previousMonth</h3><p>Goes to the previous month</p><h4>Syntax</h4><pre class="method-syntax">object.previousMonth()</pre><h4>Parameters</h4><p>No arguments.</p><h4>Return Type</h4><p><code class="type">void</code></p><h3><a name="previousYear"></a>previousYear</h3><p>Goes to the previous year</p><h4>Syntax</h4><pre class="method-syntax">object.previousYear()</pre><h4>Parameters</h4><p>No arguments.</p><h4>Return Type</h4><p><code class="type">void</code></p><h3><a name="updateDateLabel"></a>updateDateLabel</h3><p>This is called when the date label should be updated. Override this to add custom drawing of the label</p><h4>Syntax</h4><pre class="method-syntax">object.updateDateLabel(<span class="methodArgument">oDate</span>, <span class="methodArgument">oLabel</span>)</pre><h4>Parameters</h4><table><thead><tr><td>Name</td><td>Type</td><td class="optional-header">Optional</td><td>Default</td><td>Descripton</td></tr></thead><tbody><tr><td><code>oDate</code></td><td><code class="type">Date</code></td><td class="optional-column"></td><td></td><td>The date object the label represents</td></tr><tr><td><code>oLabel</code></td><td><code class="type"> <code><a href="BiLabel.html">BiLabel</a></code> </code></td><td class="optional-column"></td><td></td><td>The label to update</td></tr></tbody></table><h4>Return Type</h4><p><code class="type">void</code></p><h2>Static Method Details</h2><h3><a name="isSameDay"></a>isSameDay</h3><p>This returns true if two dates represent the same day</p><h4>Syntax</h4><pre class="method-syntax">BiCalendar.isSameDay(<span class="methodArgument">d1</span>, <span class="methodArgument">d2</span>)</pre><h4>Parameters</h4><table><thead><tr><td>Name</td><td>Type</td><td class="optional-header">Optional</td><td>Default</td><td>Descripton</td></tr></thead><tbody><tr><td><code>d1</code></td><td><code class="type">Date</code></td><td class="optional-column"></td><td></td><td>The first date to compare</td></tr><tr><td><code>d2</code></td><td><code class="type">Date</code></td><td class="optional-column"></td><td></td><td>The second date to compare</td></tr></tbody></table><h4>Return Type</h4><p><code class="type">Boolean</code></p><h3><a name="isSameMonth"></a>isSameMonth</h3><p>This returns true if two dates represent the same month</p><h4>Syntax</h4><pre class="method-syntax">BiCalendar.isSameMonth(<span class="methodArgument">d1</span>, <span class="methodArgument">d2</span>)</pre><h4>Parameters</h4><table><thead><tr><td>Name</td><td>Type</td><td class="optional-header">Optional</td><td>Default</td><td>Descripton</td></tr></thead><tbody><tr><td><code>d1</code></td><td><code class="type">Date</code></td><td class="optional-column"></td><td></td><td>The first date to compare</td></tr><tr><td><code>d2</code></td><td><code class="type">Date</code></td><td class="optional-column"></td><td></td><td>The second date to compare</td></tr></tbody></table><h4>Return Type</h4><p><code class="type">Boolean</code></p></body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?