日期选择器日期(日)显示在运行时间的星期一 [英] Date Picker date(day) to be show the day monday in run time

查看:195
本文介绍了日期选择器日期(日)显示在运行时间的星期一的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有使用c sharp的日期选择器。



在运行时显示当前日期。但我不想要当前日期。日期应始终是星期一date.not运行时当前日期。





日期选择器怎么做。

i have date picker using c sharp.

in the run time it shows the current date.but i don''t want the current date.the Date should be always be the monday date.not current date in run time.


how to do in the date picker.

推荐答案

问题是什么?



您需要在代码中设置运行时的日期。找到您想要的星期一的星期一(可能是当前日期),然后将datepicker选择的值设置为它。



试用。
And what is the problem?

You need to set the date at runtime in your code behind. Find the monday of the week you want (may be current date) and then set the datepicker selected value to it.

Try out.


你需要重置DateTimePicker属性CustomFormat和Format。

的值format属性应该是Custom;然后设置CustomFormat属性,如果输入''ddd'',你可以在运行时看到星期一
You need reset DateTimePicker Property CustomFormat and Format.
The value of format Property should be the Custom;and then set the CustomFormat property,if you input ''ddd'' ,you can see the monday in the run time


这篇关于日期选择器日期(日)显示在运行时间的星期一的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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