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

Setting an end date on an Infragistics WebDateChooser control

Posted on 2007-11-19
2
2,806 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

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

861 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