asp.net - How to disable future dates in WebDateChooser -


I am using WebDateChooser in my .NET application ... by default the date selector shows the current date , So that we can choose 10 years before the current year and any date after 10 years of the current year ... but I do not want to show on the future date in Webdutt Chujar. There is a property to set up MaxDates as the current date

   

If you have any idea please help me

You can use the property.

In the code (which I think is relevant to your needs):

  WebDateChooser1.MaxDate = DateTime.Now;  

or in the source (if not dynamic then I have just been added for reference):

   

update: (@ Reply to first comment from gold)

Here are some code from my source file that meet the settings Does MaxDate property dynamically

  script runat = "server" & gt; Zero SetMaxDate (Object Sender, System.EventArgs e) {WebDateChooser1.MaxDate = DateTime.Now; } & Lt; / Script & gt; & Lt; Head runat = "server" & gt; & Lt; Title & gt; & Lt; / Title & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Form id = "form1" runat = "server" & gt; & Lt; Div & gt; & Lt; Igsch: WebDateChooser id = "WebDateChooser1" runat = "server" OnInit = "SetMaxDate" & gt; & Lt; / Igsch: WebDateChooser & gt; & Lt; / Div & gt; & Lt; / Form & gt; & Lt; / Body & gt;  

I can not attest to having this best approach since I have limited my knowledge of asp.net. However, it should work for you ...


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -