Difference between revisions of "Widget:Calendar"

From Hackerspace ACKspace
Jump to: navigation, search
m (fixed bugs)
(added toString method for inline widgets)
Line 132: Line 132:
 
         {
 
         {
 
             _node.appendChild( this._tblCalendar );
 
             _node.appendChild( this._tblCalendar );
 +
        }
 +
 +
        Calendar.prototype.toString = function( )
 +
        {
 +
            return this._tblCalendar.outerHTML;
 
         }
 
         }
 
     }
 
     }
  
 
     var calendar = new Calendar( "<!--{$date|escape:html}-->" );
 
     var calendar = new Calendar( "<!--{$date|escape:html}-->" );
     calendar.place( document.body );
+
     document.write( calendar );
 
}( ));
 
}( ));
 
</script>
 
</script>
 
</includeonly>
 
</includeonly>

Revision as of 16:03, 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.