Showing posts with label Jquery. Show all posts
Showing posts with label Jquery. Show all posts

April 13, 2016

All About jQuery..

What is jQuery?
Its a'lightweight' javascript library. With jQuery we, 'write less, and do more'.  jQuery also simplifies a lot of the complicated things from JavaScript, like AJAX calls and DOM manipulation. jQuery run exactly the same in all major browsers, including Internet Explorer 6.

December 01, 2013

How to Enable, Disable, Remove, Attach Jquery DatePicker?

<script>
        var jq = jQuery.noConflict();
</script>
<script>
    jq(function() {
    jq( "#dobDtpicker" ).datepicker({ changeMonth: true, changeYear: true, yearRange: '1900:2055', numberOfMonths: 1, dateFormat: "dd/mm/yy", showOn: "button",buttonImage: "images/date.gif", buttonImageOnly: true });
    });
</script>

<style type="text/css">
    div.ui-datepicker{
    font-size:10px;
    width: 17%;
    height: 30%;
    }
</style>

..............................
...............................................
.......................
<table>
<tr>
<td>Date of Journey:</td>
<td>
<html:text property="dob" readonly="true" styleId="dobDtpicker" size="10" />
>/td>                                       
</table>

To attach and remove the datepicker to a control use below methods :-

Attach:
 jq(#dobDtpicker).datepicker();

Remove:

 jq(#dobDtpicker).datepicker("destroy");

Enable:

 jq(#dobDtpicker).datepicker('enable');

Disable:

 jq(#dobDtpicker).datepicker('disable');

-K Himaanshu Shukla..





Copyright © 2013 - ScrutinyByKHimaanshu