.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
sivanagamahesh

Home >> Articles >> Silverlight >> Post New Resource Bookmark and Share   

 Subscribe to Articles

Disable future dates of silverlight date picker

Posted By:Subhransu Sekhar Jena       Posted Date: June 25, 2015    Points: 200    Category: Silverlight    URL: http://www.dotnetspark.com  

Disable future dates of silverlight date picker or set the max date as current date
 

If you want to disable the future dates of silverlight date picker then do the following steps:

../Img/2012/subhu_635707944381131846_Silve.png

In C# :

In xaml :

DisplayDateEnd="{Binding Source={x:Static System:DateTime.Today}, Mode=OneWay}"

Or

In Constructor:


dtpCreatedDate.DisplayDateEnd = DateTime.Now;

In VB.NET :


In xaml :

DisplayDateEnd="{Binding Source={x:Static System:DateTime.Today}, Mode=OneWay}"

Or

In Constructor:


dtpCreatedDate.DisplayDateEnd = DateTime.Now

Note: I am using dtpCreatedDate as my DatePicker name. You can set your date picker name in place dtpCreatedDate.


Happy Programming

 Subscribe to Articles

     

Further Readings:

Responses

No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More Articles on C#, ASP.Net, Vb.Net, SQL Server and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend