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

15.7k views Asked by At

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"});       
});
1

There are 1 answers

0
Nithin Krishnan P On BEST ANSWER

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/