I know when you create an element dynamically, you have to use something like:
$(\"#id\").live(\"click\", function() { //something });
According to: Jquery .live works but not with .datepicker
This should work:
$("#tdInput1").live("click", function(){ $(this).datepicker({ inline: true }); });
edit: This answer is for older versions of jQuery. For jQuery 1.9+ please try Vishal's answer.