jquery.val returns empty value
See original GitHub issueChrome’s version is 53.0.2785.143
When I call input.val() in firefox I get the value, but that doesn’t well in Chrome. I tried the ‘hack’ of disable > get the value > and enable the mask, but that didn’t seemed to work, either.
The mask is a date one:
$('#birthday').inputmask('dd/mm/yyyy',{ "placeholder": "dd/mm/aaaa" });
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:9 (5 by maintainers)
Top Results From Across the Web
JQuery val() returns empty string - Stack Overflow
returns an empty string. And this is the only field that has this problem. Calling val() for other fields returns correct values. Even...
Read more >.val() | jQuery API Documentation
The .val() method is primarily used to get the values of form elements such as input , select and textarea . When called...
Read more >val() returns empty string when non numeric text pasted into ...
.val() returns empty string when non numeric text pasted into input type="number". E.g. When I copy number with "-" symbols inside ...
Read more >JQuery val() returns empty string - YouTube
jQuery : JQuery val () returns empty string [ Beautify Your Computer : https://www.hows.tech/p/recommended.html ] jQuery : JQuery val () ...
Read more >Check whether an input text box is empty with JavaScript/jQuery
To check if the input text box is empty using jQuery, you can use the .val() method. It returns the value of a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@urielasecas , @MehdiSaeedifar ,
The jsfiddle showed me the problem. type=“date”
Which is supported on chrome and not on ff (ff uses fallback => text) The inputmask does not mask when the native type=date implementaion is used, but was patching the value anyway which causes the empty value.
Thankyou, Robbin. Here is a simplified example on jsfiddle that works in firefox but not in Chrome 53.0.2785.143: https://jsfiddle.net/3xa3ztkn/2/