Masked input vuejs without jQuery - vue.js

Can anybody ask datepicker plugin, that can be available to input some date or choose a date from the calendar (without jQuery)? Entered value must be masked

It looks like this datepicker accepts a "format" argument, which is a mask. If the format doesn't work the way you need it to, you could probably write a directive to add a mask to the input element.

Related

Vue3 v-model value mask/formatting (german number format)

I have a simple vue component which has has an input and the related v-model.
What we want is to format/mask the value, the input should have the german number format (, and . switched (From 1,000,000.00 to 1.000.000,00). The (raw) value inside the component on the other side should have the raw (englisch format) value 1,000,000.00.
Or short: I need an input which shows the german number format, the raw value still should have the english format.
Thanks in advance
I already tried it with maska which shows the value correctly on the frontend, but the raw value is just an int instead of a float.
I also tried to use vue-number-format, but i always get Vue is not defined in the console.
I also searched on stackoverflow and found a few (older) workarounds with the focus and blur event, but this seems like a dirty implementation for me.

Add spacing between numbers after some specific digits in React Native

I need to show dashes as hints and need to have equal spacing after some digits in Text Input similar to the picture attached .
Do I need to use separate text inputs for these or is it possible to achieve this in a single input text field? The user should be able to enter the number in a single go.
If you know phone number format you can do it manually in one input. You are saving it as a real number, but displaying it with spaces. If you can have various formats, from various countries you can use this package https://www.npmjs.com/package/react-native-phone-number-input
The best way to achieve that is by using mask input you can use react-native-mask-input library to do it you can check the library from here.

dojo/mvc/at doesn't return dijit/form/DateTextBox in format of constraints datePattern

This seem's to be a question often asked, but there doesn't seem to be an easy answer or an answer at all, so I risk a duplicate here, and ask again - I feel like having a puzzle with 4 pieces and don't manage to put them together:
I'm using a dojo date picker like this
<input data-dojo-type="dijit/form/DateTextBox"
data-dojo-props="constraints: { datePattern: 'yyyy-MM-dd'},
value: at(model, 'myDate')" />
The date picker displays the date in UI like I want, but the value that's assigned in model.myDate keeps being in ISO format - I'd need that to be in yyyy-MM-dd, too.
I know that I can use dojo.date.locale.format to post-process the value, but that would be after it is saved in model.myDate. I'd like to return the value in the correct format right away. Return value null if there's no input, return value undefined if there's no valid value, and return value in format yyyy-MM-dd when the given date is valid.
Maybe I can integrate that call to dojo.date.locale.format somehow? Something like .transform(..) or whatever is possible in dojo!?
I also read about overwriting the serialize method, but I don't see how and where to do that in here.
Any ideas or hint in the right direction? Many thanks in advance.
Hi just wondering if something like at(model, prop).transform(converterObj) helps: http://dojotoolkit.org/reference-guide/1.10/dojox/mvc/at.html#data-converter

Aurelia Value Converter Buggy Behavior with percentage

I am trying to convert a user input to a percentage using aurelia converter and Numeral.js.
Here is the gist: https://gist.run/?id=5bbfa902b1d14bff6f506dfcf2045370
The conversion is buggy. Basically, when I am entering the number, it does not behave as expected. Sometimes, I am not able to enter the value, and sometimes it just enters wrong value. The behavior is random.
I am not sure if the error is caused by value converter trying to convert the number at the same time I am typing. Is there a workaround?
It's trying to update on every key stroke. You want it to update after leaving the input. Try using value.bind="score | numberFormat & updateTrigger:'blur'" instead.
You can learn more about binding behaviors in the Aurelia docs.

Format date like M/D/Y

I got a date of the type SYDATUM and wondering how to format it in a format like m/d/y.
I've found some snippets on the web, but they were not really helpful.
-thanks yor your help.
You should be more specific - what exactly do you want to do with the date (use type D internally, it's shorter and does the same thing).
Do you want to WRITE it to a list screen? Use the formatting options described in the documentation and online help:
WRITE l_my_date MM/DD/YYYY.
Do you want to convert it to a text variable? Very similar:
WRITE l_my_date TO l_my_text MM/DD/YYYY.
To set the date format in a SAPscript form, see the SET DATE MASK command.
To print the formatted date in a SmartForm, use the WRITE command and a temporary variable (yes, ugly, I know...)
Most controls (ALV Grid for example) should take care of the format automatically.
However - be careful when hard-coding the format into your application. Usually you don't have to do this because the system automatically uses the format specified in the user master data. This ensures that every user will see the date formatted according to their locale settings.
Normally it's better to export the date into the plant level country specific date format:
if w_country is initial.
select single LAND1
from T001W
into w_country
where WERKS eq w_the_plant.
endif.
SET COUNTRY w_country.
write w_the_date to w_export.
for example 03/04/2002 could be different date in different country.
You can try the keyword TRANSLATE. Alternatively suggest you could have a look at this link