Opened 11 years ago

Closed 11 years ago

#8036 closed defect (fixed)

Currency control isn't working

Reported by: Raul Diaz Owned by: Adam Peller
Priority: high Milestone: 1.2.2
Component: Dijit Version: 1.2.0
Keywords: Cc:
Blocked By: Blocking:

Description

At least in the 1.2.1 version, the dojo currency control isn't working properly.

You can see in:

http://download.dojotoolkit.org/release-1.2.1/dojo-release-1.2.1/dijit/tests/form/test_validate.html

When you click in the control, it always show an invalid state. I can introduce any valid value.

Attachments (3)

07-11-2008 19-27-54.png (4.7 KB) - added by Raul Diaz 11 years ago.
07-11-2008 19-31-55.png (5.7 KB) - added by Raul Diaz 11 years ago.
15-11-2008 0-21-30.png (32.4 KB) - added by Raul Diaz 11 years ago.

Download all attachments as: .zip

Change History (13)

comment:1 Changed 11 years ago by bill

It's working for me. You need to input the cents portion... "123" is invalid but "123.45" is valid.

When you do that is it still broken for you? Are you in a different locale than en-us?

Changed 11 years ago by Raul Diaz

Attachment: 07-11-2008 19-27-54.png added

Changed 11 years ago by Raul Diaz

Attachment: 07-11-2008 19-31-55.png added

comment:2 Changed 11 years ago by Raul Diaz

Yes, perhaps the problem is the locala. My locale is es-ES.

What information can I provide you?

One thing more, I only receive the error after click in the textbox (when I try to modify the value). Initially, it doesn't show the "invalid message".

comment:3 Changed 11 years ago by Raul Diaz

I thing that it's a problem with the locale files. If I copy the currencyFormat from the en\number.js to es\number.js, it works properly.

comment:4 Changed 11 years ago by Adam Peller

Owner: set to Adam Peller

comment:5 Changed 11 years ago by Adam Peller

when I set the locale to Spanish using locale:'es-es' in the djConfig, everything works correctly for me. When I click in the box, I see "54775,53" with no warning sign, and when I change focus, I get the formatted currency back: "54.775,53"

Which browser/platform is this? Can you type javascript:alert(dojo.locale) and tell me what you get?

Do you get the same error on older versions, like Dojo 1.1.1? (you should be able to just replace the two instances of "1.2.1" in the url to try it.

Thanks.

comment:6 Changed 11 years ago by Adam Peller

Milestone: 1.2.2tbd
Resolution: worksforme
Status: newclosed

comment:7 Changed 11 years ago by Raul Diaz

Resolution: worksforme
Status: closedreopened

It stops working fine 1.2.0. In 1.1.1, it works fine.

The locale that is showed in the alert is only "es", not "es-es".

The currencyFormat value in cldr/nls/es/number.js is too different to cldr/nls/en/number.js. I'm not sure if it's correct.

Thanks

comment:8 Changed 11 years ago by Adam Peller

which browser, please?

If I use 'es' it still works for me, but I see the currency symbol before the number instead (if a country is specified, I think the CLDR goes with the conventions most populous Spanish speaking country, which may not be Spain)

Changed 11 years ago by Raul Diaz

Attachment: 15-11-2008 0-21-30.png added

comment:9 Changed 11 years ago by Raul Diaz

I tested in Chrome, but also in IE7.

I attach another image. When the page loads, the invalid icon isn't showed. It only appear when I click the textbox to start the modification of the value.

comment:10 Changed 11 years ago by Adam Peller

Milestone: tbd1.2.2
Resolution: fixed
Status: reopenedclosed

Fixed in [15711] and [15708]

Note: See TracTickets for help on using tickets.