Calendar
Calendar
| Property | Description | Type | Default | Required | 
| type | Selection type  : Single date  : Date range. | String | single | No | 
| tagData | Tag data, including  ,  ,   or not, tag color  . The tagColor includes 1.#f5a911, 2.#e8541e, 3.#07a89b 4.#108ee9 and 5.#b5b5b5. | 
 | No | |
| onSelect | Select range callback. | ([startDate, endDate]) => void | No | |
| onMonthChange | Callback on clicking month change, including two parameters currentMonth (change to next month) and prevMonth (change to previous month). | (currentMonth, prevMonth) => void | No | |
| onSelectHasDisableDate | Selected range includes unusable date. | (currentMonth, prevMonth) => void | No | 
Example
copy
{
  "defaultTitle": "AntUI Component Library",
  "usingComponents":{
    "calendar": "mini-antui/es/calendar/index"
  }
}copy
<view>
  <calendar
    type="single"
    tagData="{{tagData}}"
    onSelect="handleSelect" />
</view>copy
Page({
  data: {
    tagData: [
      { date: '2018-05-14', tag: 'Returning mortgage', tagColor: 5 },
      { date: '2018-05-28', tag: 'Provident fund', tagColor: 2 },
    ],
  },
  handleSelect() {},
  onMonthChange() {},
});