Opened 5 years ago

Closed 5 years ago

#18210 closed defect (fixed)

NumberTextBox - strange behaviour when locale set to de-de

Reported by: Bonuspunkt Owned by:
Priority: undecided Milestone: 1.10.1
Component: Dijit - Form Version: 1.10.0
Keywords: Cc:
Blocked By: Blocking:

Description

i just ran into the following issues

<script data-dojo-config="locale: 'de-de'"
    src="https://ajax.googleapis.com/ajax/libs/dojo/1.10.0/dojo/dojo.js"></script>
<script>
require(['dijit/form/NumberTextBox'], function(NumberTextBox) {
    var numberBox = new NumberTextBox({constraints: {pattern: '#.0'}}).placeAt(document.body);

    var value = 123.1234;
    numberBox.set('value', value);
    var actual = numberBox.get('value');

    console.log('input:', value, 'getValue:', actual)
});
</script>

outputs input: 123.1234 getValue: 123 expected (same as with locale en-us) input: 123.1234 getValue: 123.1

<script data-dojo-config="locale: 'de-de'"
    src="https://ajax.googleapis.com/ajax/libs/dojo/1.10.0/dojo/dojo.js"></script>
<script>
require(['dijit/form/NumberTextBox'], function(NumberTextBox) {
    var numberBox = new NumberTextBox().placeAt(document.body);

    var value = 123.1234;
    numberBox.set('value', value);
    var actual = numberBox.get('value');

    console.log('input:', value, 'getValue:', actual)
});
</script>

outputs input: 123.1234 getValue: NaN expected (same as with locale en-us) input: 123.1234 getValue: 123.123

Change History (2)

comment:1 Changed 5 years ago by Bonuspunkt

fixed in 1.10.1

can somebody close it?

comment:2 Changed 5 years ago by bill

Milestone: tbd1.10.1
Resolution: fixed
Status: newclosed

Ok, good.

Probably a dup of #18260 or #17955.

Note: See TracTickets for help on using tickets.