在DateTimePicker中更改日历中日期的格式 [英] Change the format of date in the calendar in a DateTimePicker

查看:104
本文介绍了在DateTimePicker中更改日历中日期的格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我必须在DateTimePicker中更改日期的格式.

我不想更改未展开日历时出现的日期(所选日期),但是,我需要能够格式化展开DTPicker时出现在日历中的日期.

如何获取内部日期(通常显示当前日期)?

谢谢..
Kavir

Hi All,

I have to change the format of a date in a DateTimePicker.

I do not want to change the date that appears when the calendar is not expanded (the selected date), however, I need to be able to format the date that appears inside the calendar when I expand the DTPicker.

How to grab the inner date (which normally shows the current date)?

Thxs..
Kavir

推荐答案

dtp.Format=DateTimePickerFormat.Custom;
dtp.CustomFormat="dd-MM-yyyy";



您可以在以下位置指定您的选择:



You can specify your choice in:

dtp.CustomFormat=""


这篇关于在DateTimePicker中更改日历中日期的格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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