Mo.
Mo.

Reputation: 27505

how can I add another function with on datepicker

I need to add another function when click for date picker. here is my code

    $("#datepicker").datepicker({
            showOn: "button",
            buttonText:"Change activation date",
            dateFormat: 'DD, d MM, yy',
            minDate: 0,
            maxDate: '+90D',
            altField: '#altDate',
            beforeShowDay: $.datepicker.noWeekends,
    });

I need to show my div while click one the button

     $("#datepicker").click(function(){
         alert("me");
         $("#maanu").show();
      });

could any one help me to add this function with date picker please

Upvotes: 0

Views: 76

Answers (1)

charlietfl
charlietfl

Reputation: 171689

I am assuming you want this to be based on when a user picks a date

If you look at the docs for any jQueryUI widget, there is the options tab, but also the events tab. You can pass any of the events into your widget initialization options

$("#datepicker").datepicker({
    /* your original options here*/

    onSelect: function( event, ui){
        alert("me");
        $("#maanu").show();
    }
});

Upvotes: 2

Related Questions