src/datepicker/dateUtils.js
function monthCalendar(date) {
    var start = date.clone().startOf("month").startOf("week").startOf("day");
    var end = date.clone().endOf("month").endOf("week").startOf("day");
    var result = [];
    var current = start.weekday(0).subtract(1, "d");
    while (true) {
        current = current.clone().add(1, "d");
        result.push(current);
        if (areDatesEqual(current, end)) {
            break;
        }
    }
    return result;
}
function monthCalendar(date) {
    var start = date.clone().startOf("month").startOf("week").startOf("day");
    var end = date.clone().endOf("month").endOf("week").startOf("day");
    var result = [];
    var current = start.weekday(0).subtract(1, "d");
    while (true) {
        current = current.clone().add(1, "d");
        result.push(current);
        if (areDatesEqual(current, end)) {
            break;
        }
    }
    return result;
}
function monthCalendar ( date ) { var start = date . clone ( ) . startOf ( "month" ) . startOf ( "week" ) . startOf ( "day" ) ; var end = date . clone ( ) . endOf ( "month" ) . endOf ( "week" ) . startOf ( "day" ) ; var result = [ ] ; var current = start . weekday ( 0 ) . subtract ( 1 , "d" ) ; while ( true ) { current = current . clone ( ) . add ( 1 , "d" ) ; result . push ( current ) ; if ( areDatesEqual ( current , end ) ) { break ; } } return result ; }
Array of days belongs to the month of the specified date
including previous and next month days which are on the same week as first and last month days.
Array of days belongs to the month of the specified date including previous and next month days which are on the same week as first and last month days .