How to, Jquery DatePicker Enable, Disable, Remove, attach

After worked with Jquery and their related plug ins in the web applications thought of writing nice posts on rare findings.

In some requirements we need to attach and remove the datepicker to a control or to a division. So, how to attach datepicker to a control or div dynamically… After read the jquery datepicker documentation, got to know the way to do that. The same case with Remove, enable, disable… So, below are the ways to do them.

Attach:
$(".datepicker").datepicker();

Remove:
$(".datepicker").datepicker("destroy");

Enable:
$(".datepicker").datepicker('enable');

Disable:
$(".datepicker").datepicker('disable');

NOTE: The selector I used [.datepicker] is just for example…. You need to give the id or class selector according to your requirement in place….

Do you like this post? Do you want to know anything more? Please post all here….

0 komentar:

Post a Comment

Related Posts with Thumbnails
GiF Pictures, Images and Photos