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
Solved

Customize ASP.NET's Calendar-control

Posted on 2002-04-01
7
635 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
  • 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
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

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

 
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: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone 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

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 information …
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used.

791 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