.. _dijit/Calendar: dijit.Calendar =============== :Status: Contributed, Draft :Version: 1.4 :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. 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. Starting with version 1.4, the month name is a drop-down control for selecting a different month. The Calendar widget has been supported as a standalone widget since version 1.4. Prior to that, to meet the accessibility requirements of the Dijit project which requires accessibility on all widgets, the implementation was private and began with an underscore character: dijit._Calendar. 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 ==== Note ==== dijit._Calendar was upgraded to dijit.Calendar in version 1.4.0. An alias is provided for backwards compatibility. ======== See Also ======== * :ref:`dojox.widget.Calendar ` - An enhanced but still experimental calendar widget which has additional capabilities like year-only views and animation effects.