Hi,

I am working on C#.
I have 2 dropdownlists(for Year and Month) and a ImageButton.
On click of the image button,a calendar is displayed.

I want the default month and year of the calendar to be the same as selected month and year from the dropdown list.Also the previous month prior to selected month must be disabled.

Can anyone help me on this.

Thanks in advance

You can use calender.VisibleDate and calender.SelectedDate ,to do that.Set the value of VisibleDate/SelectedDate to the value in the dropdown.Like...

Calendar1.VisibleDate= DateTime.Parse(date);//where date is a  string
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.