primeng icon indicating copy to clipboard operation
primeng copied to clipboard

<p-spinner> not allowing minus/subtraction char at start

Open joelr2m opened this issue 8 years ago • 1 comments

I'm submitting a ...

[*] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35

Current behavior Have gotten a little problem on my hands. I can't seem to figure out how to allow for my to allow usage of the - sign. Well, we can type it but it is instantly removed. I have tried using a or , which does allow the - sign but doesn't allow for decimals the way I want. It only works if I hold down the - key and then type numbers, or if I type the numbers and then put the - sign in front of it.

Could there be that the issue is actually is with the FormControl for the component, or is there something in my . I've tried removing every directive and property, but doesn't help. Here is the code for the spinner:

<p-spinner formControlName="AmountFormControl" class="inputTextStyle" pattern="^-?[0-9]*\,?[0-9]+$" [thousandSeparator]="swedishLocaleConfigurationService.swedishThousandSeparator()" [decimalSeparator]="swedishLocaleConfigurationService.swedishDecimalCharacter()"> </p-spinner>

There doesn't seem to matter which versions I use of any of the languages or/and frameworks and libraries.

Expected behavior Would be nice if it would work.

Minimal reproduction of the problem with instructions I have tried but it seems to be application specific.

What is the motivation / use case for changing the behavior? Otherwise I cant meet the demands that we have for the application.

Please tell us about your environment:

  • Angular version: 5.X 5.2.9

  • PrimeNG version: 5.X 5.2.4

  • Browser: Chrome 65.0.3325.181 (Official Build) (64-bit)

  • Language: TypeScript 2.8.1

joelr2m avatar Apr 11 '18 08:04 joelr2m

I'm unable to replicate with the latest PrimeNG. If the issue still persists with the new version please create a new issue with our stackblitz template.

cagataycivici avatar Oct 23 '18 08:10 cagataycivici