Bootstrap Input Mask is not Working in Dynamic Textboxes? What can i do?

Nithin Krishnan P picture Nithin Krishnan P · Nov 20, 2014 · Viewed 15.5k times · Source

I tried this code also.But didnt get the out.

$(document).on("focus", ".date-picker", function () {       
   $(".date-picker").inputmask("dd-mm-yyyy", {"placeholder": "dd-mm-yyyy"});       
});

Answer

Nithin Krishnan P picture Nithin Krishnan P · Nov 20, 2014

try Using Jquery Mask instead on Bootsrtap input masking...It works very well

$("#btn").click( function (){       
       $("#content").append('<input class="date" type="text"></input>');       
    $(".date").mask("99/99/9999");       
});         
$(".date").focus( function (){       
      $(".date").mask("99/99/9999");      
});       

[Working Fiddle Demo] :http://jsfiddle.net/SEXAj/855/