calendar-calculator
A plugin for calendar calculator , 中文
Install
npm install calendar-calculator
Features
- Highly customizable
- No dependence on UI, You can design by yourself
- Support browser、nodejs、miniProgram(小程序)
Usage
var oCalendar = startDate: '2017-07-17' endDate: '2018-08-18'; var months = oCalendar; console;
Parameter
startDate
- the start date formatted likeYYYY-MM-DD
endDate
- the end date formatted likeYYYY-MM-DD
Method
getTotal
- get the total months fromstartDate
toendDate
Result
After use getTotal
method will return the result structure below
[ ...]
date properties
date
- total date formattedYYYY-MM-DD
day
- date formattedDD
weekday
- weekday from0
to6
week
- Chinese weekday日一二三四五六
isPrevMonth
- if it is previous month date, will betrue
isNextMonth
- if it is next month date, will betrue
disabled
- if it isisPrevMonth
、isNextMonth
or current month disabled date(not betweenstartDate
toendDate
), will betrue