I am using the .NET Compact 开发者_如何学CFramework in VS 2005.
How can we disable specific dates in a DatePicker in C#? And how can we disable all Saturdays?Thanks
There isn't any built-in method to do this.
You have a few options, such as:
- Using the built-in date picker, and then display a prompt if the user selects a Saturday,
- Build your own date picker control from scratch, though this would require a bit more work, or
- Use HTML to power your interface - there are many great date picker controls available for HTML, such as the one found in jQuery UI.
There is no built in functionality for your requirement. What you would have to do is handling that in the date changed event.
精彩评论