Function: Date and time control, used to manually select date and time.
Common properties:
Common events:
Backend code demonstration:
//日期变化时获取日期
private void dateTimePicker1_ValueChanged(object sender, EventArgs e)
{
textBox2.Text = dateTimePicker1.Text;//获取被选中的日期,格式是年月日
textBox2.AppendText(dateTimePicker1.Value.ToString()); //获取被选中的日期,格式为数学+/
}