Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
V
vue-masked-input
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vladislav Barabash
vue-masked-input
Commits
c051c746
Commit
c051c746
authored
Jan 25, 2017
by
NikulinR
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FF fixes
parent
0e88de01
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
10 deletions
+25
-10
README.md
README.md
+5
-0
dist/build.js
dist/build.js
+3
-3
dist/build.js.map
dist/build.js.map
+1
-1
src/App.vue
src/App.vue
+1
-1
src/MaskedInput.vue
src/MaskedInput.vue
+15
-5
No files found.
README.md
View file @
c051c746
...
...
@@ -26,3 +26,8 @@ If you need to include one of these characters as a static part of the mask, you
```
vue
<masked-input
v-model=
"phone"
mask=
"+\\1 (111) 111-1111"
placeholder=
"Phone number"
type=
"tel"
/>
```
## Known issues/TODO
*
Copy/cut/paste in FF
*
Copy/cut/paste in mobile Chrome
*
Cyrillic chars are not supported in mobile Chrome
dist/build.js
View file @
c051c746
This source diff could not be displayed because it is too large. You can
view the blob
instead.
dist/build.js.map
View file @
c051c746
This diff is collapsed.
Click to expand it.
src/App.vue
View file @
c051c746
...
...
@@ -15,7 +15,7 @@
<li>
# – alphanumeric, forced to upper case when entered
</li>
</ul>
<h4>
Date:
</h4>
<masked-input
v-model=
"date"
mask=
"11 / 11 / 1111"
placeholder=
"Date"
/><span
v-if=
""
>
{{
date
}}
</span>
<masked-input
v-model=
"date"
mask=
"11 / 11 / 1111"
placeholder=
"Date"
/><span
v-if=
""
>
{{
date
}}
</span>
<p
class=
"code"
>
<
masked-input v-model="date" mask="11 / 11 / 1111" placeholder="Date" /
>
</p>
...
...
src/MaskedInput.vue
View file @
c051c746
...
...
@@ -62,7 +62,8 @@ export default {
pattern
:
this
.
mask
,
value
:
this
.
default
})
this
.
$refs
.
input
.
value
=
this
.
mask_core
.
setValue
=
this
.
default
this
.
$refs
.
input
.
value
=
this
.
default
this
.
mask_core
.
setValue
(
this
.
default
)
this
.
mask_core
.
setSelection
({
start
:
0
,
end
:
0
...
...
@@ -173,19 +174,28 @@ export default {
}
},
keyPress
(
e
)
{
//works only on Desktop
input
(
e
)
{
},
keyPress
(
e
)
{
//works only on Desktop //Dirty FF hack
if
(
navigator
.
userAgent
.
indexOf
(
'
Firefox
'
)
!=
-
1
&&
parseFloat
(
navigator
.
userAgent
.
substring
(
navigator
.
userAgent
.
indexOf
(
'
Firefox
'
)
+
8
))
>=
3.6
)
{
e
.
preventDefault
()
e
.
data
=
e
.
key
this
.
textInput
(
e
)
}
},
textInput
(
e
)
{
e
.
preventDefault
()
if
(
e
.
preventDefault
)
e
.
preventDefault
()
if
(
this
.
mask_core
.
input
(
e
.
data
))
{
this
.
updateToCoreState
()
this
.
updateAfterAll
=
true
}
this
.
updateToCoreState
()
},
keyUp
(
e
)
{
if
(
this
.
updateAfterAll
)
this
.
updateToCoreState
()
this
.
updateToCoreState
()
this
.
updateAfterAll
=
false
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment