Skip to content
This repository was archived by the owner on Sep 12, 2024. It is now read-only.

Commit bcc7e32

Browse files
committed
Merge pull request #8 from sensortower/next-arrow-fixes
Next arrow fixes
2 parents b0af8cb + 3aaa71d commit bcc7e32

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

gulpfile.babel.js

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import del from 'del';
66

77
const $ = gulpLoadPlugins();
88

9-
109
requireDir('./tasks');
1110

1211
gulp.task('clean', del.bind(null, ['.tmp', '.publish', 'dist']));

src/scripts/daterangepicker/calendar-header-view.coffee

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,15 @@ class CalendarHeaderView
5151

5252
prevArrowCss: ->
5353
date = @firstDate().clone().subtract(1, 'millisecond')
54+
date = date.endOf('month') if @period() in ['day', 'week']
5455
{'arrow-hidden': !@currentDate.isWithinBoundaries(date)}
5556

5657
nextArrowCss: ->
5758
[cols, rows] = @period.dimentions()
5859
date = @firstDate().clone().add(cols * rows, @period())
60+
date = date.startOf('month') if @period() in ['day', 'week']
5961
{'arrow-hidden': !@currentDate.isWithinBoundaries(date)}
6062

61-
62-
6363
monthOptions: ->
6464
minMonth = if @currentDate.minBoundary().isSame(@currentDate(), 'year') then @currentDate.minBoundary().month() else 0
6565
maxMonth = if @currentDate.maxBoundary().isSame(@currentDate(), 'year') then @currentDate.maxBoundary().month() else 11

0 commit comments

Comments
 (0)