Set the HTML placeholder attribute to the desired mask on the input field: 


<input type="text" name="FieldName" placeholder="dd/mmm/yyyy">

/* Copyright (c) 2018 The Interact Technology Group */ 
/* THE CODE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/* All rights reserved. */

 

Above code will display "dd/mmm/yyyy", to alert the user of format that should be typed into the field.


NOTES:


  • The mask will disappear when the input field is under focus.
     
  • This will not limit the format of the characters typed in. To achieve this, a 3rd party JavaScript library needs to be used.