I am using jquery date input plugin from here
I call the function inside the html page like this
jQuery(function($){
$("#date").mask("99/99/9999");
});
It works fine in every fields where we just have to specify the id of the element.
I have a table which creates table rows of html elements dynamically, I want the date input plugin to apply date mask in the text box having mfd date.
Since the id keeps changing dynamically as the row length is being added one by one to the id to make the id unique.
How can i use the masked date input inside the dom table ?
You could do the work inside your
insSpecfunction, where you have both the ID and the markup at your disposal.Without using the ID:
Using the ID:
And since that cell really only has one input, you only need to look for the input
Or you could emit an event after the new row has been created and attach the mask to the last row in the table always, or even pass the last row as data to the event listeners.