Skip to content
This repository has been archived by the owner on Sep 4, 2024. It is now read-only.

Get raw value #42

Open
johnmerced-ks opened this issue May 10, 2017 · 22 comments
Open

Get raw value #42

johnmerced-ks opened this issue May 10, 2017 · 22 comments

Comments

@johnmerced-ks
Copy link

Is there a way to get the raw value without any formatting?

Raw value: 5555555555
Formatted: 555-555-5555

Regards,

@johnmerced-ks johnmerced-ks changed the title Get Raw value Get raw value May 10, 2017
@wdkenn
Copy link

wdkenn commented May 12, 2017

+1 - would like to know if this is possible

@probil
Copy link
Owner

probil commented May 24, 2017

Currently it's not stored inside v-mask. Sounds like a feature request

@vpratfr
Copy link

vpratfr commented May 7, 2018

Agree. Would be great that the v-model value reflects the raw input rather than the formatted input.

@probil
Copy link
Owner

probil commented Oct 23, 2018

It's going to be fixed in #278

@paolog22
Copy link

paolog22 commented Nov 8, 2019

+1 on this. currently using v-mask as directive i was looking for something like v-mask.raw="'##-##-##'"

displayed value = '11-22-33'
actual value in model = 112233

thanks

@mrother
Copy link

mrother commented Mar 13, 2020

It would be nice a directive "masked=true|false" to update the v-model with/without the mask.

thanks!

@diego-lipinski-de-castro
Copy link

diego-lipinski-de-castro commented May 2, 2020

We still cant do this? lol

Update: you can use my repo, it create a data attribute on the input with the name of unmasked and you can retrieve the raw value from it

https://github.com/bw2tecnologia/v-mask

@edsonfeimberg
Copy link

+1 for this. If the directive could return the raw value this would be the perfect masking choice for vue

@aligzl
Copy link

aligzl commented Feb 16, 2021

+1

2 similar comments
@mlopez-forevercar
Copy link

+1

@Victor7095
Copy link

+1

@probil probil pinned this issue Jul 8, 2021
@davidurco
Copy link

For anyone looking for a simple solution!

You can make a simple mask-field component where you can parse raw value from masked value.
image

getRawValue(value) {
  const rawValueArray = []
  this.mask.split('').forEach((character, i) => {
    if (character === '#') {
      charArray.push(value[i])
    }
  })

  return rawValueArray.join('')
},

@NathanAlcantara
Copy link

This would be incredible if is native!!

@Rifaldikn
Copy link

Any progress for this one?

@shaxzodbek-uzb
Copy link

+1

2 similar comments
@cristianpelaezm
Copy link

+1

@johngerome
Copy link

+1

@rmarmitt
Copy link

bump

@mixaadev
Copy link

mixaadev commented Jul 6, 2022

+1

@baartho
Copy link

baartho commented Jul 21, 2022

Would be greatly appreciated!

@stanleygomes
Copy link

+1

1 similar comment
@leandrobentoneiva
Copy link

+1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests