TapeGun007 Posted January 18, 2017 Share Posted January 18, 2017 (edited) I cannot seem to get this code to work. What's interesting, is that I've used this before and had no issues, but it was on a different server. There has got to be something super simple that I am overlooking. Here is the code: <!DOCTYPE HTML> <head> <title>Untitled 3</title> </head> <body> <script type='text/javascript' src='js/jquery-3.1.1.js'></script> <script type="text/javascript" src="js/jquery.maskedinput.js"></script> <script type="text/javascript"> jQuery(function(){ $("#date").mask("99/99/9999",{placeholder:"mm/dd/yyyy"}); }); </script> <input id="date" type="text" /> </body> </html> It just doesn't format the Input field at all. Help? PS. I know the paths are correct. Edited January 18, 2017 by TapeGun007 Quote Link to comment Share on other sites More sharing options...
Psycho Posted January 18, 2017 Share Posted January 18, 2017 Well, when I go to this page which appears to be the main page for the JQuery mask plug-in none of the fields appear to be working (at least for one at the bottom). I tried both Chrome and IE. When did you last see this work somewhere? Quote Link to comment Share on other sites More sharing options...
TapeGun007 Posted January 18, 2017 Author Share Posted January 18, 2017 (edited) When I went to the page you just linked, the Date field works just fine once you start typing. They probably should have included placeholder="MM/DD/YYYY". I had an account on BlueHost and coded a website there about a year ago. I should have mentioned, the script is from http://digitalbush.com/projects/masked-input-plugin/ Edited January 18, 2017 by TapeGun007 Quote Link to comment Share on other sites More sharing options...
Solution TapeGun007 Posted January 18, 2017 Author Solution Share Posted January 18, 2017 Wow. I changed this line jQuery(function($){ Now it works... Quote Link to comment Share on other sites More sharing options...
Psycho Posted January 19, 2017 Share Posted January 19, 2017 When I went to the page you just linked, the Date field works just fine once you start typing. They probably should have included placeholder="MM/DD/YYYY". I see. I was expecting to see the placeholders as well. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.