Micah
Micah

Reputation: 116150

How do I open the jquery datepicker by clicking on a hyperlink?

I have a link <a href="#">Choose Date</a> that I want to click and pop open the datepicker. Is there any way to do this?

Upvotes: 1

Views: 748

Answers (2)

kobe
kobe

Reputation: 15835

you can do this right. you can have a click handler for a href and handle the code inside that

<a href="#" class="sample">Choose Date</a>

$('.sample').click(function() {
   // write your logic here 
   return false;
});

Upvotes: 0

Victor Nicollet
Victor Nicollet

Reputation: 24577

Yes, by calling it on a div and then showing/hiding that div. Use altField to write the date to a hidden input element.

Upvotes: 1

Related Questions