Calendar control - advanced tweaking

P

Paul W

I want to display the 'weekselector' buttons but I don't want them to issue
a PostBack when pressed (I want to execute client-side JS instead).

I inserted the following into the SelectWeekText property:
<img src='arrow.jpg' onclick='Javascript:alert("hello from weekselector")'>

The html that gets rendered is then:

<img src='arrow.jpg' onclick='Javascript:alert("hello from
weekselector")'></a></td>
<td align="Center"><a href="javascript:__doPostBack('Calendar1','1730')"
style="color:#CC9966">26</a></td>
<td align="Center" ><a href="javascript:__doPostBack('Calendar1','1731')"
style="color:#CC9966">27</a></td>
....

When I click on the selector it will execute my JS first, but then performs
the PostBack. How can I remove/nullify the PostBack? Or any other approaches
to this?

Of course just setting SelectionMode to 'Day' will not work, because then it
doesn't show the week selector at all.

Thanks,

Paul.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top