How to display and read a float in a non english (german) ionic 3 app? - ionic-framework

In an ionic 3 app I am currently trying to get a floating point number as user input. Since the application is exclusively targeting a german audience I am expecting input with a comma as the decimal separator, e.g. 750,5.
In addition I would like to open the numerical keyboard.
I tried including an input field with type="text". I parsed the resulting input string using a custom parsing method, which respects the different decimal separator.
Since the input field has a two way binding and the application might change the number itself I convert the number to a string using the Angular decimal pipe like so:
numberString = new DecimalPipe('de').transform(value.count, '1.0-2');
That worked well, however the app always opens the full alphanumerical keyboard.
To show the numerical keyboard I used the input field with type="number".
<ion-input type="number" step="any"></ion-input>
Using this, the numerical shows as expected. However the input field now includes thousand separators. For example if I type 7500, the input field displays 7,500 using the English decimal separator.
Now I am not sure where this problem is caused but the app itself seems to be running under an English locale although the device is set to German. I expect the problem to be solved by setting the web view locale to German. How could I achieve this?

Related

vue 3, thousand separator on input with type number

I am using vue 3 and Ionic, need to add thousand separator (space) to the input, problem is that I need to use type number for number keyboard appear in mobile.
All packages which I try not working with type numbers
Thanks a lot

Google Sheets float numbers in .csv becoming dates in .xls

Google Sheets currently does something rather obnoxious if you type a number such as 15.5 into a cell - it converts the number into 15/05/2020
I have a sheet file with lots of prices filled in, but every now and then I see these dates pop up... I can't do arithmetics with those dates, and using the "format" command to turn them into money numbers yields crazy stuff, 43.966,00 for example (from the number above)
Is there a workaround for this?
tl;dr - I need the floating point numbers which resemble dates to not become dates when inserted into a cell.
edit:
I didn't include all the information at first, so here we go:
The issue is not only typing in values, I'm actually reading a .csv file and inserting it into sheets via python's pydrive.
The workaround must not be something manual, I'd like my numbers to "show up" correctly in sheets without further manipulating the file.
In Brasil sheets (because of Portuguese i assume) the comma is used as the decimal, not the period. So instead of writing 15.5 you need to write your numbers like 15,5
You can change that by changing the locale of the sheet to somewhere that uses traditional decimal points.

Kentico 9 form fields.. Is there a way to make a feild into a currency field only?

Have a form I am trying to build and even though I have a text box field that will work for users to enter a $ amount it would be nice to make it so that field only accepts numbers and keeps it in the $0.00 format. Seems like a simple thing but I cannot seem to find out how this would be done.
You need to specify the field as a decimal or double and define the precision (depending on what version you are using). The field should NOT be a text field but can use a textbox as the displaying control.
From an output standpoint, it will not automatically output $0.00, you have to format that based on the culture. There are several macros and functions within the API to do this.
Setup you control as followed
make the Data type a decimal number
in the Editing control settings click to show the Advanced section
in Filter set Type to Numbers and Custom
Add Valid characters your delimiter (, or .)
In the validation section add a rule for the minimum value to be 0.
The data type will enforce it to be a actual number.
You could also use as Validation a Regular expression setting something like:
^[$]?([0-9]{1,2})?,?([0-9]{3})?,?([0-9]{3})?(\.[0-9]{2})?[$]?$
which will allow a dollar sign prefix or suffix.

How to store subscript and superscript values in Progress OpenEdge?

Is there a way to store subscript and superscript values in the Progress database, for example, chemical symbols and formulas, such as C2H5OH, and is it possible to display them ?
I tried copying from Word and pasting into fill in string fields but it doesn't format correctly, it doesn't recognize subscripted values and it is displayed as C2H5OH.
After some testing I've come this far:
1) You need to start your session with startup parameter -cpinternal utf-8 ie
prowin32.exe -cpinternal utf8
Depending on your need you might also need to set -cpstream utf-8 and possibly -cpcoll basic (or something else that matches your needs).
When I did this I had some strange crashes - but that might be because I edited a file saved in another codepage?
2) You need to get the data into your system (perhaps you already have it?).
I used Word and information found here and further explained here. The subscript font setting are just font settings (not unicode) so don't let that fool you (copy-pasting from your question is exactly the same). Basically you need to write the hexadecimal value of the subscript 2 (2082) in Word and then press Alt + X.
Assuming you want to write the actual data in a Progress based GUI I haven't been successful so far. Perhaps you could look at changing registry values as described in the links and continue along that path. I don't want to do that for just basic testing...
3) You will need a font with decent support for these characters. Some fonts don't support them at all!
Segoe UI:
Default system font (possibly) MS Sans Serif:
Arial:
5) Database? I'm unsure if you will need to use CLOB-fields to store this in your database or not. Most likely you shouldn't.
Hope this is enough to at least get you started!

Creating a text input that brings up the numeric keyboard but does not format results

I'm working on a iPhone compatible web page. I need to bring up the numeric keyboard but keep the field from formatting the input. The input should be either three groups of numbers separated by a decimal point (##.##.##) or four groups of numbers separated by a decimal point (##.##.##.##).
type="number"
Formats the input so that only one period is allowed.
type="tel"
works on the iPad, but brings up the wrong keyboard on iPhone.
Sorry if this is an easy question, I'm new both to HTML 5 and iPhone development.