在DatatimePicker中禁用某些天(例如周末) [英] disable some days(ex. weekends) in DatatimePicker

查看:102
本文介绍了在DatatimePicker中禁用某些天(例如周末)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在Windows窗体应用程序的datatimePicker日历中禁用某些日子,以使用户无法选择那些日子.

I want to disable some days in the calendar of the datatimePicker in my Windows Form application, such that users can not select those days.
It''s possible to do it?

推荐答案

当前日期时间选择器不支持.

您将不得不做一些工作,以使一旦选择了日期,便会放置一个if语句来计算日期,然后强制重新选择.
Not something that is supported in the current datetimepicker.

You would have to do a work around such that once a date is picked you put an if statement to calculate the day and then force a repick.


这篇关于在DatatimePicker中禁用某些天(例如周末)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆