diff --git a/gulpfile.babel.js b/gulpfile.babel.js index a425c0e..937d634 100644 --- a/gulpfile.babel.js +++ b/gulpfile.babel.js @@ -6,7 +6,6 @@ import del from 'del'; const $ = gulpLoadPlugins(); - requireDir('./tasks'); gulp.task('clean', del.bind(null, ['.tmp', '.publish', 'dist'])); diff --git a/src/scripts/daterangepicker/calendar-header-view.coffee b/src/scripts/daterangepicker/calendar-header-view.coffee index 7c29b31..e58b145 100644 --- a/src/scripts/daterangepicker/calendar-header-view.coffee +++ b/src/scripts/daterangepicker/calendar-header-view.coffee @@ -51,15 +51,15 @@ class CalendarHeaderView prevArrowCss: -> date = @firstDate().clone().subtract(1, 'millisecond') + date = date.endOf('month') if @period() in ['day', 'week'] {'arrow-hidden': !@currentDate.isWithinBoundaries(date)} nextArrowCss: -> [cols, rows] = @period.dimentions() date = @firstDate().clone().add(cols * rows, @period()) + date = date.startOf('month') if @period() in ['day', 'week'] {'arrow-hidden': !@currentDate.isWithinBoundaries(date)} - - monthOptions: -> minMonth = if @currentDate.minBoundary().isSame(@currentDate(), 'year') then @currentDate.minBoundary().month() else 0 maxMonth = if @currentDate.maxBoundary().isSame(@currentDate(), 'year') then @currentDate.maxBoundary().month() else 11