Skip to content

Commit 1a5a24f

Browse files
authored
Merge pull request #12403 from TrinTragula/master
feat(DateRangePicker): Add showWeekNumbers
2 parents 40a151f + 21438d3 commit 1a5a24f

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

projects/igniteui-angular/src/lib/date-range-picker/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ With projected inputs:
120120
| overlaySettings | OverlaySettings | Changes the default overlay settings used by the `IgxDateRangePickerComponent`. |
121121
| placeholder | string | Sets the `placeholder` for single-input `IgxDateRangePickerComponent`. |
122122
| weekStart | number | Sets the start day of the week. Can be assigned to a numeric value or to `WEEKDAYS` enum value. |
123+
| showWeekNumbers | number | Shows or hides week numbers. |
123124

124125
### Outputs
125126
| Name | Description | Cancelable | Emitted with |

projects/igniteui-angular/src/lib/date-range-picker/date-range-picker.component.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,20 @@ export class IgxDateRangePickerComponent extends PickerBaseDirective
256256
@Input()
257257
public override outlet: IgxOverlayOutletDirective | ElementRef<any>;
258258

259+
/**
260+
* Show/hide week numbers
261+
*
262+
* @remarks
263+
* Default is `false`.
264+
*
265+
* @example
266+
* ```html
267+
* <igx-date-range-picker [showWeekNumbers]="true"></igx-date-range-picker>
268+
* ``
269+
*/
270+
@Input()
271+
public showWeekNumbers = false;
272+
259273
/**
260274
* Emitted when the picker's value changes. Used for two-way binding.
261275
*
@@ -1018,6 +1032,7 @@ export class IgxDateRangePickerComponent extends PickerBaseDirective
10181032
this.calendar.weekStart = this.weekStart;
10191033
this.calendar.hideOutsideDays = this.hideOutsideDays;
10201034
this.calendar.monthsViewNumber = this.displayMonthsCount;
1035+
this.calendar.showWeekNumbers = this.showWeekNumbers;
10211036
this.calendar.selected.pipe(takeUntil(this._destroy$)).subscribe((ev: Date[]) => this.handleSelection(ev));
10221037

10231038
componentInstance.mode = this.mode;

0 commit comments

Comments
 (0)