Skip to content

Commit

Permalink
feat(old-datepicker): adding id for tag (#3695)
Browse files Browse the repository at this point in the history
* adding id for tag

adding id for tag similar to month component

* using [attr.id]

* using id attribute

using id attribute at this level similar to day and month picker
  • Loading branch information
anil-kk authored and valorkin committed Mar 14, 2018
1 parent 856fcd6 commit be14f34
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/datepicker/monthpicker.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import { DatePickerInnerComponent } from './datepicker-inner.component';
</thead>
<tbody>
<tr *ngFor="let rowz of rows">
<td *ngFor="let dtz of rowz" class="text-center" role="gridcell" id="{{dtz.uid}}" [ngClass]="dtz.customClass">
<td *ngFor="let dtz of rowz" class="text-center" role="gridcell" [attr.id]="dtz.uid" [ngClass]="dtz.customClass">
<button type="button" style="min-width:100%;" class="btn btn-default"
[ngClass]="{'btn-link': isBs4 && !dtz.selected && !datePicker.isActive(dtz), 'btn-info': dtz.selected || (isBs4 && !dtz.selected && datePicker.isActive(dtz)), disabled: dtz.disabled, active: !isBs4 && datePicker.isActive(dtz)}"
[disabled]="dtz.disabled"
Expand Down
2 changes: 1 addition & 1 deletion src/datepicker/yearpicker.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import { DatePickerInnerComponent } from './datepicker-inner.component';
</thead>
<tbody>
<tr *ngFor="let rowz of rows">
<td *ngFor="let dtz of rowz" class="text-center" role="gridcell">
<td *ngFor="let dtz of rowz" class="text-center" role="gridcell" [attr.id]="dtz.uid">
<button type="button" style="min-width:100%;" class="btn btn-default"
[ngClass]="{'btn-link': isBs4 && !dtz.selected && !datePicker.isActive(dtz), 'btn-info': dtz.selected || (isBs4 && !dtz.selected && datePicker.isActive(dtz)), disabled: dtz.disabled, active: !isBs4 && datePicker.isActive(dtz)}"
[disabled]="dtz.disabled"
Expand Down

0 comments on commit be14f34

Please sign in to comment.