开发者

Adding Telerik Datepicker to Dynamically added form fields

I have a scenario where I开发者_运维百科 have to dynamically add fields on the page through JavaScript.

How can I apply telerik datepicker to dynamically added fields?

I'm using telerik extensions for ASP.net MVC 3.


You can try this (make sure the required javascript files are included):

$("<input />").appendTo(document.body).tDatePicker();


You can try this for creating a DatePicker dynamically

var dp = @Html.Telerik().DatePicker().Name("DateCreated").InputHtmlAttributes(new { @class = "FilterDatePicker" });

$("#body").append(dp);

$('.FilterDatePicker').tDatePicker();
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜