Plugins Form Calendar
# jQuery EasyUI Form Plugin - Calendar
* * jQuery EasyUI Plugins](#)
* * *
Override the default defaults with $.fn.calendar.defaults.
The calendar displays a monthly calendar that allows the user to select a date and navigate to the previous and next months. By default, the first day of the week is set to Sunday. This can be changed by setting the value of the 'firstDay' property.
!(#)
## Usage
Create a calendar from markup.
Create a calendar using javascript.
$('#cc').calendar({ current:new Date()});
## Properties
| Name | Type | Description | Default |
| :--- | :--- | :--- | :--- |
| width | number | The width of the calendar component. | 180 |
| height | number | The height of the calendar component. | 180 |
| fit | boolean | When set to true, the calendar will be sized to fit its parent container. | false |
| border | boolean | Defines whether to show the border. | true |
| firstDay | number | Defines the first day of the week. Sunday (Sunday) is 0, Monday (Monday) is 1, ... | 0 |
| weeks | array | The list of weekdays to display. | ['S','M','T','W','T','F','S'] |
| months | array | The list of months to display. | ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] |
| year | number | The year of the calendar. The following example demonstrates how to create a calendar with a specified year and month. | Current year (4 digits) |
| month | number | The month of the calendar. | Current month (starting from 1) |
| current | Date | The current date. | Current date |
## Events
| Name | Parameters | Description |
| :--- | :--- | :--- |
| onSelect | date | Fires when the user selects a date. Code example: $('#cc').calendar({onSelect: function(date){alert(date.getFullYear()+":"+(date.getMonth()+1)+":"+date.getDate());}}); |
## Methods
| Name | Parameters | Description |
| :--- | :--- | :--- |
| options | none | Returns the options object. |
| resize | none | Resizes the calendar. |
| moveTo | date | Moves the calendar to a specified date. Code example: $('#cc').calendar('moveTo', new Date(2012, 6, 1)); |
* * *
[![Im
YouTip