Solved

Setting an end date on an Infragistics WebDateChooser control

Posted on 2007-11-19
2
2,798 Views
Last Modified: 2013-12-17
I am using an Infragistics calendar control, on an aspx web form. I need to set the calendar control so that the application user can only scroll forward three years into the future from todays date.
I could not discover a way to set this in the properties view in the designer, and so I am attempting to do this progromatically.

Here is some sample code I wrote that compiles and builds, but does not set the start and finish date. In this example I just hard coded an end date of the year 2020, and the start date from today's date.

// Using Infragistics.WebUI.WebSchedule.WebDateChooser control
   protected void Page_Load(object sender, EventArgs e)
    {
        wdcStartDate.MinDate = DateTime.Now;
        wdcStartDate.MaxDate = new System.DateTime(2020, 12, 31, 0, 0, 0, 0);
    }
0
Comment
Question by:brgdotnet
2 Comments
 
LVL 16

Accepted Solution

by:
gnoon earned 250 total points
ID: 20333113
Is this help
protected void Page_Load(object sender, EventArgs e)
{
  wdcStartDate.MinDate = DateTime.Now;
  wdcStartDate.MaxDate = new System.DateTime(DateTime.Now.Year+3, 12, 31, 0, 0, 0, 0); // next 3 years
}

Open in new window

0
 
LVL 2

Author Comment

by:brgdotnet
ID: 20475012
My apologies. I never gave  you points for your answer. I will attend to that in the next few days as I am surviving a terrible cold right now.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

813 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

18 Experts available now in Live!

Get 1:1 Help Now