Difference between revisions of "Widget:Calendar"

From Hackerspace ACKspace
Jump to: navigation, search
(created first version of calendar)
 
(fixed bugs, removed category)
Line 18: Line 18:
 
== Copy to your site ==
 
== Copy to your site ==
 
To use this widget on your site, just install [http://www.mediawiki.org/wiki/Extension:Widgets MediaWiki Widgets extension] and copy [{{fullurl:{{FULLPAGENAME}}|action=edit}} full source code] of this page to your wiki as '''{{FULLPAGENAME}}''' article.
 
To use this widget on your site, just install [http://www.mediawiki.org/wiki/Extension:Widgets MediaWiki Widgets extension] and copy [{{fullurl:{{FULLPAGENAME}}|action=edit}} full source code] of this page to your wiki as '''{{FULLPAGENAME}}''' article.
[[Category:SpaceAPI]]
+
 
 
</noinclude><includeonly><script type="text/javascript">
 
</noinclude><includeonly><script type="text/javascript">
 
(function( )
 
(function( )
Line 71: Line 71:
 
             this._tblCalendar = document.createElement( "table" );
 
             this._tblCalendar = document.createElement( "table" );
 
             this._today = new Date( );
 
             this._today = new Date( );
             this._date = _date ? _date : this._today;
+
             this._date = _date ? new Date( _date ): this._today;
 
             this._date.setHours( 0, 0, 0, 0 );
 
             this._date.setHours( 0, 0, 0, 0 );
 
             var date = new Date( this._date.getFullYear(), this._date.getMonth(), 1 );
 
             var date = new Date( this._date.getFullYear(), this._date.getMonth(), 1 );
Line 132: Line 132:
 
         {
 
         {
 
             _node.appendChild( this._tblCalendar );
 
             _node.appendChild( this._tblCalendar );
 +
        }
 
     }
 
     }
  

Revision as of 16:55, 25 February 2016

This widget allows you to display a calendar

Created by Xopr

Using this widget

To insert this widget, use the following code:

{{#widget:Calendar
|date=march 1 2011
}}

This will give the following result:

Copy to your site

To use this widget on your site, just install MediaWiki Widgets extension and copy full source code of this page to your wiki as Widget:Calendar article.