Alex Wood
Alex Wood

Reputation: 841

jQuery datepicker listener options

My goal is to have a jQuery datepicker pop up when the user clicks a link, not a text box. Additionally, I was wondering if I can set up links from a given date (to list scheduled events).

I've been attempting to modify the demo code on the jQuery demo site and others to fit these requirements, but I'm very unfamiliar with javascript and jQuery so I've been having a lot of trouble.

Any help is much appreciated!

Upvotes: 1

Views: 1297

Answers (1)

chaos
chaos

Reputation: 124287

Well, the first part is easy:

<a href="javascript:$('#whatever').datepicker()">link text</a>

The second is a bit difficult, but you might be able to do something like:

<script type="text/javascript">
$('#whatever td:has(a:contains(19))').append('<a href="date_event?id=foo">Some Event</a>');
</script>

to add a link to the cell for the 19th, for example.

Upvotes: 1

Related Questions