Skip to content

Commit

Permalink
test(calendar): respect viewDate is always 1 #7039
Browse files Browse the repository at this point in the history
  • Loading branch information
hanastasov committed Jul 9, 2020
1 parent 343401e commit 1527573
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 4 deletions.
14 changes: 12 additions & 2 deletions projects/igniteui-angular/src/lib/calendar/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ The calendar header will not be rendered when the selection is either `multi` or

- `viewDate: Date`

Controls the year/month that will be presented in the default view when the calendar renders. By default it is the current year/month.
Controls the year/month that will be presented in the default view when the calendar renders. By default it is the first day of the current year/month.

- `value: Date | Date[]`

Expand Down Expand Up @@ -173,7 +173,17 @@ Controls the visibility of the dates that do not belong to the current month.
- `onSelection(): Date | Date[]`

Event fired when a value is selected through UI interaction.
Returns the selected value (depending on the type of selection).
Emits the selected value (depending on the type of selection).

- `onViewDateChanged(): IViewDateChangeEventArgs`

Event fired after the the month/year presented in the view is changed.
Emits an object containing the previous and current value of the `viewDate` property.

- `onActiveViewChanged(): CalendarView`

Event fired after the active view is changed.
Emits an CalendarView enum, indicating the `activeView` property value.


### Methods
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ The default value is `en`.

- `viewDate: Date`

Controls the year/month that will be presented in the default view when the month picker renders. By default it is the current year/month.
Controls the year/month that will be presented in the default view when the month picker renders. By default it is the first day of the current year/month.

- `value: Date`

Expand Down Expand Up @@ -121,3 +121,13 @@ The default values are listed below.

Event fired when a value is selected through UI interaction.
Returns the selected value (depending on the type of selection).

- `onViewDateChanged(): IViewDateChangeEventArgs`

Event fired after the the month/year presented in the view is changed.
Emits an object containing the previous and current value of the `viewDate` property.

- `onActiveViewChanged(): CalendarView`

Event fired after the active view is changed.
Emits an CalendarView enum, indicating the `activeView` property value.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ describe('IgxMonthPicker', () => {
};

expect(monthPicker.value).toBeUndefined();
expect(monthPicker.viewDate.getDate()).toEqual(instance.viewDate.getDate());
expect(monthPicker.viewDate.getDate()).toEqual(1);
expect(monthPicker.locale).toEqual('en');

const today = new Date(Date.now());
Expand Down

0 comments on commit 1527573

Please sign in to comment.