Calendar

Calendar

Scan QR code to try:

Calendar

Attribute    NameDescriptionTypeDefaultMandatory
typeSelection   type single: Single date range: Date rangeStringsinglefalse
tagDataTag   data, including date, tag, disable or not, tag color tagColor. The tagColor includes   1.#f5a911, 2.#e8541e, 3.#07a89b 4.#108ee9 and 5.#b5b5b5Array<date, tag, tagColor>false
onSelectSelect   range callback([startDate,   endDate]) => voidfalse
onMonthChangeCallback   on clicking month change, including two parameters currentMonth (change to   next month) and prevMonth (change to previous month)(currentMonth,   prevMonth) => voidfalse
onSelectHasDisableDateSelected   range includes unusable date(currentMonth,   prevMonth) => voidfalse

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() {},
});