| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- describe('validRange rendering', function() {
- describe('with hardcoded start constraint', function() {
- describe('when month view', function() {
- pushOptions({
- defaultView: 'month',
- defaultDate: '2017-06-01',
- validRange: { start: '2017-06-07' }
- });
- it('does not render days before', function() {
- initCalendar();
- ViewRenderUtils.expectDayRange('2017-06-07', '2017-07-09');
- });
- });
- describe('when in week view', function() {
- pushOptions({
- defaultView: 'agendaWeek',
- defaultDate: '2017-06-08',
- validRange: { start: '2017-06-06' }
- });
- it('does not render days before', function() {
- initCalendar();
- ViewRenderUtils.expectDayRange('2017-06-06', '2017-06-11');
- });
- });
- });
- describe('with hardcoded end constraint', function() {
- describe('when month view', function() {
- pushOptions({
- defaultView: 'month',
- defaultDate: '2017-06-01',
- validRange: { end: '2017-06-07' }
- });
- it('does not render days on or after', function() {
- initCalendar();
- ViewRenderUtils.expectDayRange('2017-05-28', '2017-06-07');
- });
- });
- describe('when in week view', function() {
- pushOptions({
- defaultView: 'agendaWeek',
- defaultDate: '2017-06-08',
- validRange: { end: '2017-06-06' }
- });
- it('does not render days on or after', function() {
- initCalendar();
- ViewRenderUtils.expectDayRange('2017-06-04', '2017-06-06');
- });
- });
- });
- });
|