Solved

Customize ASP.NET's Calendar-control

Posted on 2002-04-01
7
634 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
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/…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

821 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