.. _dijit/_Calendar: dijit._Calendar =============== :Status: Contributed, Draft :Version: 1.3 :Authors: Adam Peller :Developers: Adam Peller .. contents:: :depth: 2 The _Calendar widget displays a localized month-view calendar and allows the user to navigate months and years and select a date. It is typically used as part of the :ref:`DateTextBox ` which includes a text box and uses the _Calendar as a drop-down. Localizations for hundreds of languages and cultures are included as part of the Dojo Toolkit. The locale will be chosen based on the djConfig.locale setting of your page, using navigator.language by default. To meet the accessibility requirements of the Dijit project, which requires keyboard accessibility on input controls, the _Calendar must be used in conjunction with :ref:`DateTextBox `. For this reason, the _Calendar widget is not supported standalone and is prefixed with an underscore ("_"). However, a standalone calendar can easily be added to a page as seen in the demo below. Navigating between months is possible with the arrow icons, and the next and previous year may be clicked to change to that year. Holding the mouse down on these controls will repeat the action. In version 1.4+, the month name is a drop-down control for selecting a different month. Non-Gregorian calendar use is possible using the datePackage attribute and experimental date classes in :ref:`dojox.date `. ======== Examples ======== A plain Calendar widget with the formatted date below .. cv-compound:: :type: inline :height: 350 .. cv:: javascript .. cv:: html

.. cv:: css With an initial selection and weekends disabled .. cv-compound:: :height: 320 :version: 1.4 .. cv:: javascript .. cv:: html
.. cv:: css Javascript declaration, with a restriction of +/- one week from the current date .. cv-compound:: :height: 320 .. cv:: javascript .. cv:: html
.. cv:: css With a local custom template to change the layout (does not work against CDN) .. cv-compound:: :height: 600 :version: 9.99 .. cv:: javascript .. cv:: css .. cv:: html [experimental: 1.4+] Non-Gregorian calendars .. cv-compound:: :version: 1.4 :height: 340 .. cv:: javascript .. cv:: html
.. cv:: css ======== See Also ======== * :ref:`dojox.widget.Calendar ` - An enhanced but still experimental version of Calendar which has additional capabilities like year-only views and animation effects.