Solved

Customize ASP.NET's Calendar-control

Posted on 2002-04-01
7
630 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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

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…
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…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

706 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now