Applets calendar component

I did the first picture of the calendar component I wanted to do

parameter type instructions The default value
header Boolean Whether to display the header action bar true
preMonth Boolean Whether to display the last month button true
nextMonth Boolean Whether to display the next month button true
preYear Boolean Whether to display the previous year button false
nextYear Boolean Whether to display the next year button false
today Boolean Whether to display today button false
weeks Boolean Whether to display the week title true
weeksType String Weekly heading type cn
showMoreDays Boolean Whether to display before and after month residual data false
formatType String Date connector
The name of the event instructions
select Triggered when a date is selected to return the selected date

The sample

index.wxml

<calendar today="{{true}}" bind:select="select"></calendar>
Copy the code

index.json

"usingComponents": {
        "calendar": ".. /.. /.. /components/calendar/index"
    }
Copy the code

index.js

select(e) {
        console.log(e)
    },
Copy the code

Returns the selected date e.dail.value

github