Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Type one number, saved completely different
Message
De
31/12/2015 04:36:59
 
 
Information générale
Forum:
Javascript
Catégorie:
Autre
Divers
Thread ID:
01629485
Message ID:
01629490
Vues:
29
This message has been marked as a message which has helped to the initial question of the thread.
>Hi everybody,
>
>I'm typing (to test) this number 9911111111. I then press Save button and get 1321176519 instead. The numbers are defined as integer in the database.
>
>The markup (I believe wrong) is the following:
>
>
> <div class="col-md-8">
>                <input type="number" 
>                       name="binNo" 
>                       id="binNo" 
>                       ng-model="currentSites.binNo" 
>                       class="form-control"
>                       placeholder="@Labels.binNo" 
>                       ng-maxlength="10"
>                       data-sm:number-format 
>                       data-sm:number />
>            </div>
>
>Thanks in advance.

I assume that when you say 'save' you mean on the server.
My guess is that you are saving this as an int and 9911111111 is too large.
long l = 9911111111;
int i = (int) l; //i = 1321176519;
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform