Solved

Setting an end date on an Infragistics WebDateChooser control

Posted on 2007-11-19
2
2,779 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
Comment Utility
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
Comment Utility
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

771 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

10 Experts available now in Live!

Get 1:1 Help Now