Skip to content

Barcode "UPC-A" renders incorrect leading zero #7147

Open
@gdenchevprog

Description

@gdenchevprog

Bug report

When the type of the barcode is set to "upca", the component renders incorrect value under the barcode itself. The actual barcode works as expected but visually the format is incorrect.

Additionally, the spacing needs to be updated as well, check the following image to see how the spacing must look like:
https://user-images.githubusercontent.com/70957719/206397545-8ad07528-b04c-414b-9560-d5626df601a7.png

Reproduction of the problem

Run the following Dojo and observe the text under the barcode:

https://dojo.telerik.com/@sspasova/awUjozON

Current behavior

The value of the barcode is "04030110001" however the displayed text is "004030110001" - one extra zero at the start. Currently, if the checksum is also enabled, the barcode appears to have 13 characters which is not correct.

Expected/desired behavior

The leading "0" should not appear in the barcode. The user must manually input 11 character of which the first is "0" and if they enable the checksum this brings the total number of digits to 12 which is the correct format for type UPC-A.

Environment

  • Kendo UI version: 2023.3.1114
  • jQuery version: 3.4.1
  • Browser: [all]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions