Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

mask date of birth/ dob in javascript

  maskDate(date) {
    // console.log(date);
    var dateVar = new Date(date);
    // console.log("XX/XX/"+ dateVar.getFullYear().toString().substr(-2));
    return "XX/XX/"+ dateVar.getFullYear().toString().substr(-2);
  }
 
PREVIOUS NEXT
Tagged: #mask #date #dob #javascript
ADD COMMENT
Topic
Name
3+7 =