473,797 Members | 3,204 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How do I diable/greyout dates in a calendar

Hi,

Language: C#, asp .net application

This is a room reservations web application.
I have two Calendars on my website: Calendar1 & Calendar2
Calendar1 shows the current month and Calendar2 shows the next month.
The clients are allowed to do the reseration (if any room(s) is/are
available) for the next 15 days starting from the current date.

Problem no. 1:--------------------

How do I go through the list of dates and grey out the ones (or disable) the
ones that are not valid?

For eg today is Dec. 18, 2004. So, only the following dates in Calendar1
shoud be active and the others must be greyed out or disable.
Dec 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31

In Calendar2 only Jan 1, 2005 must be active (the 15th day) - the remaining
dates must be greyed out.

Problem no.2:---------------------------

Calendar1 and Calendar2 starts with the dates from the previous month as
well.
How do I get rid of those dates from the previous months?

For eg: Dec 2004 looks like this

Sun Mon Tue Wed Thu Fri Sat
28 29 30 1 2 3 4

I would like to get rid of the 28, 29, 30. How will I do this? is there a
setting in the properties where I could just change it?

Please advise.

Thank you for the help.

Regards,
Li
Nov 16 '05 #1
1 2147
Write a Handler for the DayRender event, and modify the Cell parameter as
you see fit.
Likhith Areekkal wrote:
Hi,

Language: C#, asp .net application

This is a room reservations web application.
I have two Calendars on my website: Calendar1 & Calendar2
Calendar1 shows the current month and Calendar2 shows the next month.
The clients are allowed to do the reseration (if any room(s) is/are
available) for the next 15 days starting from the current date.

Problem no. 1:--------------------

How do I go through the list of dates and grey out the ones (or
disable) the ones that are not valid?

For eg today is Dec. 18, 2004. So, only the following dates in
Calendar1 shoud be active and the others must be greyed out or
disable. Dec 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31

In Calendar2 only Jan 1, 2005 must be active (the 15th day) - the
remaining dates must be greyed out.

Problem no.2:---------------------------

Calendar1 and Calendar2 starts with the dates from the previous month
as well.
How do I get rid of those dates from the previous months?

For eg: Dec 2004 looks like this

Sun Mon Tue Wed Thu Fri Sat
28 29 30 1 2 3 4

I would like to get rid of the 28, 29, 30. How will I do this? is
there a setting in the properties where I could just change it?

Please advise.

Thank you for the help.

Regards,
Li


--
Truth,
James Curran [erstwhile-MVP]
Home: www.noveltheory.com Work: www.njtheater.com
Blog: www.honestillusion.com Day Job: www.partsearch.com
Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2413
by: F | last post by:
Hi I have posted the question few days back about problem in inserting the dates in SQL server and thankful to them who replied. That was solved and this is a nice solution. http://www.aspfaq.com/show.asp?id=2023 Now I am facing another problem. I have to get data between two dates. That dates user has to provide and in
2
3310
by: Christopher M. Pieper | last post by:
I want to generate a resultset that is just a series of numbers in ascending order or perhaps a series of dates.. What I mean is, is there a way to generate a temporary table of dates given an input of a start date and an end date.. This table would then contain an entry for each date in ascending order from the start date to and including the end date.. Or perhaps with numbers, given a start of 5 and and end of 7 the resulting table...
4
11705
by: Dale | last post by:
Hi Everyone, I've got a form that provides a pop-up calendar for users to select dates for requesting jobs to be completed. The calendar works great, but it unfortunately allows users to select dates earlier than today (which they should't be allowed to do). I've started coding some validation scripts, but I'm stuck now and my approach doesn't seem to be working. I've Googled all morning looking for an answer and couldn't find one and
0
1440
by: ActiveUp | last post by:
http://www.activeup.com/products/components/activecalendar Active Calendar is an ASP.NET server control that allows users to select a date and/or time quickly using a professional looking date picker with a client-side managed event system. No postback to the server required, no external script file required. Active Calendar includes the Active DateTime technology. You can disable the visible calendar format and simply use the Active...
24
4448
by: PromisedOyster | last post by:
Is there a way that I can get a resultset that contains unique dates in a given date range without the need to have a temporary table and a cursor? perhaps something like: declare @start_date as datetime declare @end_date as datetime set @start_date as '1/1/2005' set @end_date as '1/1/2006'
2
3330
by: Rachel Suddeth | last post by:
Is there a way to have the non-selectable dates (those before MinDate and after MaxDate) draw differently so my users can see right away what dates aren't allowed? I'm not seeing it... Otherwise, anyone know of a cheap 3rd party calendar control I could use that would provide that ability? Thanks, Rachel
9
5823
by: Greg | last post by:
Hi, I have a table with "dates", i'd like to display those dates on a calendar. I've put a calendar in a form, linked to my "date" field, and it works, but only showing one "date" per calendar. I can see all "dates" moving to next records, but one per calendar. :-( Ex: 17/06 on one claendar, then if i click on next record, I can see my calendar with 24/06 ...etc ...
5
4725
by: na | last post by:
I need to make certain date selectable in a calendar control depending on records found in a database. For example, if the 10/20/2006 and 11/20/2006 records exist in the database, then only enable and highlight thoese two days in the calendar control. Also, I need to disable all weekends. Is this doable? How do I do this in the calendar control's DataBinding, Load, or PreRender event. Thanks.
2
2676
by: MobiusDick | last post by:
Hi All, I'm in the process of creating a database that allows users to enter details into a form which includes a date range as start and end dates. I have used the inbuilt Calendar Control 10.0 control to allow users to select the date. It is linked to two combo boxes and using the following code (this code is repeated for each combo box): Private Sub cmbStartDate_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As...
0
9537
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10469
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10246
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10209
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10023
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9066
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5582
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4135
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2934
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.