Skip to content

Commit

Permalink
primefaces#3376 bug fixed
Browse files Browse the repository at this point in the history
The '#' character added to colorpicker.ts when the format is default (hex). Then, in HTML, we do not need to add '#' for providing style.backgroundColor, because it already includes '#'
  • Loading branch information
SefaMuratcanKatirci committed Jul 16, 2017
1 parent e820ea4 commit ac010a1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/app/components/colorpicker/colorpicker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ export class ColorPicker implements ControlValueAccessor, AfterViewChecked, OnDe
let val: any;
switch(this.format) {
case 'hex':
val = this.HSBtoHEX(this.value);
val = "#" + this.HSBtoHEX(this.value);
break;

case 'rgb':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<h3 class="first">Inline</h3>
<p-colorPicker [(ngModel)]="color1" inline="true"></p-colorPicker>

<p style="margin-top:.5em">Selected Color: <span style="display:inline-block;width:32px;height:32px;vertical-align:middle" [style.backgroundColor]="'#' + color1"></span> {{color1}} </p>
<p style="margin-top:.5em">Selected Color: <span style="display:inline-block;width:32px;height:32px;vertical-align:middle" [style.backgroundColor]="color1"></span> {{color1}} </p>

<h3>Overlay</h3>
<p-colorPicker [(ngModel)]="color2"></p-colorPicker>
Expand Down

0 comments on commit ac010a1

Please sign in to comment.