Solved

Customize ASP.NET's Calendar-control

Posted on 2002-04-01
7
636 Views
Last Modified: 2008-01-09
In ASP.NET I would like to change to SelectWeekText to actual weeknumbers. Default is to set this property to some static HTML text, but in the OnDayRender event you can customize some more. I would like to change the text in the cell to the left which contains links to select the whole week, to contain weeknumbers.

BRAINSTORM ME! Thx...
0
Comment
Question by:snoffy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 23

Expert Comment

by:naveenkohli
ID: 6910343
What have you tried so far?
The text that you set for SelecteWeekText can be anything from a static text to an actual HTML tag.

StaticWeekText = "Next"

or

StaticWeekText = ">img src="foo.jpg"<"

So in OnDayRender, you can always set the attribute for the cell so that it gets aligned left. Is that what you are looking for?
0
 
LVL 20

Expert Comment

by:Silvers5
ID: 6910454
will you be more specific about the cell and post some code
0
 

Author Comment

by:snoffy
ID: 6910497
Picture this:
You add a Calendar control to your page.
You set the property SelectMode = "DayWeek".
You set the SelectWeekText = "WEEK".

Now you have a calendar control in which you can either select a specific day OR select a whole week by clicking the text WEEK which we declared above.

Now, I want the text WEEK replaced by the actual numer of the week for the weeks displayed in the calendar.

So instead of having a calendar with 6 links saying "WEEK" to select that week, I would like to have 6 links saying "week 14", "week 15", "week 16" and so on.

I tried refering to the "WEEK" cell in OnDayRender but it only triggers on DAY-cells, not on the week-cell.

Get it...?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 23

Accepted Solution

by:
naveenkohli earned 300 total points
ID: 6916714
It seems you are out of luck for this. BEcause Calendar control does have any event for week selectors. If you look at the implementation of Calendar control, you will find that it does not allow for customization of the selector cells other than that you can specify the text or html tags that you want to display.
0
 

Author Comment

by:snoffy
ID: 6917946
I thought of implementing a javascript in SelectWeekText which creates a unique weeknumber for each run. I tried it quick'n'dirty and it should work, I only made it increment a number, but that number could be weeknumbers. So that works, but not in a pretty way.
0
 
LVL 58

Expert Comment

by:Gary
ID: 8830748
This question has been abandoned. I will make a recommendation to the moderators on its resolution in a week or two. I appreciate any comments that would help me to make a recommendation.

In the absence of responses, I may recommend DELETE unless it is clear to me that it has value as a PAQ. Silence = you don't care

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

GaryC123
EE Cleanup Volunteer
0
 
LVL 58

Expert Comment

by:Gary
ID: 8866596
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
To be deleted and points forfeited
Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
GaryC123
EE Cleanup Volunteer
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Passing Parameter to Stored Procedure 4 32
ASP and Looping Thru a XML Document 4 35
Display field if column exists 7 36
Read text on Table 7 31
I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question