[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2873
  • Last Modified:

Setting an end date on an Infragistics WebDateChooser control

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
brgdotnet
Asked:
brgdotnet
1 Solution
 
gnoonCommented:
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
 
brgdotnetAuthor Commented:
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now